Box · Schema
Trashed File
Represents a trashed file.
Cloud StorageCollaborationContent ManagementDocumentsEnterpriseFile Sharing
Properties
| Name | Type | Description |
|---|---|---|
| id | string | 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.bo |
| etag | string | The HTTP `etag` of this file. This can be used within some API endpoints in the `If-Match` and `If-None-Match` headers to only perform changes on the file if (no) changes have happened. |
| type | string | `file` |
| sequence_id | object | |
| name | string | The name of the file |
| sha1 | string | The SHA1 hash of the file. This can be used to compare the contents of a file on Box with a local file. |
| file_version | object | |
| description | string | The optional description of this file |
| size | integer | The file size in bytes. Be careful parsing this integer as it can get very large and cause an integer overflow. |
| path_collection | object | |
| created_at | string | The date and time when the file was created on Box. |
| modified_at | string | The date and time when the file was last updated on Box. |
| trashed_at | string | The time at which this file was put in the trash. |
| purged_at | string | The time at which this file is expected to be purged from the trash. |
| content_created_at | string | The date and time at which this file was originally created, which might be before it was uploaded to Box. |
| content_modified_at | string | The date and time at which this file was last updated, which might be before it was uploaded to Box. |
| created_by | object | |
| modified_by | object | |
| owned_by | object | |
| shared_link | string | The shared link for this file. This will be `null` if a file has been trashed, since the link will no longer be active. |
| parent | object | |
| item_status | string | Defines if this item has been deleted or not. * `active` when the item has is not in the trash * `trashed` when the item has been moved to the trash but not deleted * `deleted` when the item has been |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/TrashFile",
"title": "Trashed File",
"type": "object",
"x-box-resource-id": "trash_file",
"x-box-tag": "trashed_files",
"description": "Represents a trashed file.",
"required": [
"id",
"type",
"sequence_id",
"sha1",
"description",
"size",
"path_collection",
"created_at",
"modified_at",
"modified_by",
"owned_by",
"item_status"
],
"properties": {
"id": {
"type": "string",
"nullable": false,
"description": "The unique identifier that represent a file.\n\nThe ID for any file can be determined\nby visiting a file in the web application\nand copying the ID from the URL. For example,\nfor the URL `https://*.app.box.com/files/123`\nthe `file_id` is `123`.",
"example": "123456789"
},
"etag": {
"type": "string",
"example": "1",
"nullable": true,
"description": "The HTTP `etag` of this file. This can be used within some API\nendpoints in the `If-Match` and `If-None-Match` headers to only\nperform changes on the file if (no) changes have happened."
},
"type": {
"type": "string",
"description": "`file`",
"example": "file",
"enum": [
"file"
],
"nullable": false
},
"sequence_id": {
"allOf": [
{
"type": "string",
"example": "3",
"nullable": true,
"description": "A numeric identifier that represents the most recent user event\nthat has been applied to this item.\n\nThis can be used in combination with the `GET /events`-endpoint\nto filter out user events that would have occurred before this\nidentifier was read.\n\nAn example would be where a Box Drive-like application\nwould fetch an item via the API, and then listen to incoming\nuser events for changes to the item. The application would\nignore any user events where the `sequence_id` in the event\nis smaller than or equal to the `sequence_id` in the originally\nfetched resource."
},
{
"nullable": false
}
]
},
"name": {
"type": "string",
"description": "The name of the file",
"example": "Contract.pdf"
},
"sha1": {
"type": "string",
"format": "digest",
"nullable": false,
"example": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
"description": "The SHA1 hash of the file. This can be used to compare the contents\nof a file on Box with a local file."
},
"file_version": {
"allOf": [
{
"$ref": "#/components/schemas/FileVersion--Mini"
},
{
"description": "The information about the current version of the file."
}
]
},
"description": {
"type": "string",
"nullable": false,
"description": "The optional description of this file",
"maxLength": 256,
"example": "Contract for Q1 renewal"
},
"size": {
"type": "integer",
"nullable": false,
"description": "The file size in bytes. Be careful parsing this integer as it can\nget very large and cause an integer overflow.",
"example": 629644
},
"path_collection": {
"allOf": [
{
"title": "Path collection (Trash)",
"description": "A list of parent folders for an item in the trash.",
"type": "object",
"required": [
"total_count",
"entries"
],
"properties": {
"total_count": {
"description": "The number of folders in this list.",
"example": 1,
"type": "integer",
"format": "int64",
"nullable": false
},
"entries": {
"description": "Array of folders for this item's path collection",
"type": "array",
"items": {
"type": "object",
"description": "The parent folder for this item",
"properties": {
"type": {
"type": "string",
"description": "`folder`",
"enum": [
"folder"
],
"example": "folder"
},
"id": {
"type": "string",
"description": "The unique identifier that represent a folder.",
"example": "123456789"
},
"sequence_id": {
"type": "string",
"nullable": true,
"example": null,
"description": "This field is null for the Trash folder"
},
"etag": {
"type": "string",
"nullable": true,
"example": null,
"description": "This field is null for the Trash folder"
},
"name": {
"type": "string",
"description": "The name of the Trash folder.",
"example": "Trash",
"nullable": false
}
}
}
}
}
},
{
"description": "The tree of folders that this file is contained in,\nstarting at the root."
},
{
"nullable": false
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"nullable": false,
"description": "The date and time when the file was created on Box.",
"example": "2012-12-12T10:53:43-08:00"
},
"modified_at": {
"type": "string",
"format": "date-time",
"nullable": false,
"description": "The date and time when the file was last updated on Box.",
"example": "2012-12-12T10:53:43-08:00"
},
"trashed_at": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "The time at which this file was put in the trash.",
"example": "2012-12-12T10:53:43-08:00"
},
"purged_at": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "The time at which this file is expected to be purged\nfrom the trash.",
"example": "2012-12-12T10:53:43-08:00"
},
"content_created_at": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "The date and time at which this file was originally\ncreated, which might be before it was uploaded to Box.",
"example": "2012-12-12T10:53:43-08:00"
},
"content_modified_at": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "The date and time at which this file was last updated,\nwhich might be before it was uploaded to Box.",
"example": "2012-12-12T10:53:43-08:00"
},
"created_by": {
"allOf": [
{
"$ref": "#/components/schemas/User--Mini"
},
{
"description": "The user who created this file"
}
]
},
"modified_by": {
"allOf": [
{
"$ref": "#/components/schemas/User--Mini"
},
{
"description": "The user who last modified this file"
},
{
"nullable": false
}
]
},
"owned_by": {
"allOf": [
{
"$ref": "#/components/schemas/User--Mini"
},
{
"description": "The user who owns this file"
},
{
"nullable": false
}
]
},
"shared_link": {
"type": "string",
"description": "The shared link for this file. This will\nbe `null` if a file has been trashed, since the link will no longer\nbe active.",
"example": null,
"nullable": true
},
"parent": {
"allOf": [
{
"$ref": "#/components/schemas/Folder--Mini"
},
{
"description": "The folder that this file is located within."
},
{
"nullable": true
}
]
},
"item_status": {
"type": "string",
"description": "Defines if this item has been deleted or not.\n\n* `active` when the item has is not in the trash\n* `trashed` when the item has been moved to the trash but not deleted\n* `deleted` when the item has been permanently deleted.",
"enum": [
"active",
"trashed",
"deleted"
],
"nullable": false,
"example": "trashed"
}
}
}