{ "opencollection": "1.0.0", "info": { "name": "Box Authorize Authorization File Versions API", "version": "1.0" }, "items": [ { "info": { "name": "File Versions", "type": "folder" }, "items": [ { "info": { "name": "Box List all file versions", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/files/:file_id/versions", "params": [ { "name": "file_id", "value": "12345", "type": "path", "description": "The unique identifier that represents 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`." }, { "name": "fields", "value": "id,type,name", "type": "query", "description": "A comma-separated list of attributes to include in the\nresponse. This can be used to request fields that are\nnot normally returned in a standard response.\n\nBe aware that specifying this parameter will have the\neffect that none of the standard fields are returned in\nthe response unless explicitly specified, instead only\nfields for the mini representation are returned, additional\nto the fields requested." }, { "name": "limit", "value": "1000", "type": "query", "description": "The maximum number of items to return per page." }, { "name": "offset", "value": "1000", "type": "query", "description": "The offset of the item at which to begin the response.\n\nQueries with offset parameter value\nexceeding 10000 will be rejected\nwith a 400 response." } ] }, "docs": "Retrieve a list of the past versions for a file.\n\nVersions are only tracked by Box users with premium accounts. To fetch the ID\nof the current version of a file, use the `GET /file/:id` API." }, { "info": { "name": "Box Get file version", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/files/:file_id/versions/:file_version_id", "params": [ { "name": "file_id", "value": "12345", "type": "path", "description": "The unique identifier that represents 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`." }, { "name": "fields", "value": "id,type,name", "type": "query", "description": "A comma-separated list of attributes to include in the\nresponse. This can be used to request fields that are\nnot normally returned in a standard response.\n\nBe aware that specifying this parameter will have the\neffect that none of the standard fields are returned in\nthe response unless explicitly specified, instead only\nfields for the mini representation are returned, additional\nto the fields requested." }, { "name": "file_version_id", "value": "1234", "type": "path", "description": "The ID of the file version" } ] }, "docs": "Retrieve a specific version of a file.\n\nVersions are only tracked for Box users with premium accounts." }, { "info": { "name": "Box Restore file version", "type": "http" }, "http": { "method": "PUT", "url": "{{baseUrl}}/files/:file_id/versions/:file_version_id", "params": [ { "name": "file_id", "value": "12345", "type": "path", "description": "The unique identifier that represents 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`." }, { "name": "file_version_id", "value": "1234", "type": "path", "description": "The ID of the file version" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Restores a specific version of a file after it was deleted.\nDon't use this endpoint to restore Box Notes,\nas it works with file formats such as PDF, DOC,\nPPTX or similar." }, { "info": { "name": "Box Remove file version", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/files/:file_id/versions/:file_version_id", "headers": [ { "name": "if-match", "value": "1" } ], "params": [ { "name": "file_id", "value": "12345", "type": "path", "description": "The unique identifier that represents 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`." }, { "name": "file_version_id", "value": "1234", "type": "path", "description": "The ID of the file version" } ] }, "docs": "Move a file version to the trash.\n\nVersions are only tracked for Box users with premium accounts." }, { "info": { "name": "Box Promote file version", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/files/:file_id/versions/current", "params": [ { "name": "file_id", "value": "12345", "type": "path", "description": "The unique identifier that represents 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`." }, { "name": "fields", "value": "id,type,name", "type": "query", "description": "A comma-separated list of attributes to include in the\nresponse. This can be used to request fields that are\nnot normally returned in a standard response.\n\nBe aware that specifying this parameter will have the\neffect that none of the standard fields are returned in\nthe response unless explicitly specified, instead only\nfields for the mini representation are returned, additional\nto the fields requested." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Promote a specific version of a file.\n\nIf previous versions exist, this method can be used to\npromote one of the older versions to the top of the version history.\n\nThis creates a new copy of the old version and puts it at the\ntop of the versions history. The file will have the exact same contents\nas the older version, with the the same hash digest, `etag`, and\nname as the original.\n\nOther properties such as comments do not get updated to their\nformer values.\n\nDon't use this endpoint to restore B" } ] } ], "bundled": true }