SP.FileVersionCollection object
Represents a collection of SP.FileVersion objects.
Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013
var object = new SP.FileVersionCollection()
Members
The FileVersionCollection object has the following members.
Constructor
The FileVersionCollection object has the following constructor.
Constructor |
Description |
---|---|
This member is reserved for internal use and is not intended to be used directly from your code. |
Methods
The FileVersionCollection object has the following methods.
Method |
Description |
---|---|
Deletes all the file version objects in the collection. |
|
Deletes the specified version of the file. |
|
Deletes the file version object with the specified version label. |
|
Gets the file version at the specified index in the collection. |
|
Creates a new file version from the file specified by the version label. |
Properties
The FileVersionCollection object has the following properties.
Property |
Description |
---|---|
Gets the file version at the specified index in the collection. |
REST resource endpoint
See FileVersionCollection resource for more information.
Endpoint URI structure
http://<sitecollection>/<site>/_api/web/folders/getbyurl(folderrelativeurl)/files/getbyurl(filerelativeurl)/versions
HTTP requests
This resource supports the following HTTP commands:
GET syntax
GET http://<sitecollection>/<site>/_api/web/folders/getbyurl(folderrelativeurl)/files/getbyurl(filerelativeurl)/versions
POST syntax
POST http://<sitecollection>/<site>/_api/web/folders/getbyurl(folderrelativeurl)/files/getbyurl(filerelativeurl)/versions