Getting Version of SharePoint Document
You can get a resource representation of a specific version of a SharePoint document with the specified ID.
Request
GET https://<hostname>:4443/v6/RestoreSessions/{restoreSessionId}/Organization/Sites/{siteId}/Documents/{documentId}/Versions/{versionId} |
Request Headers
The request header must contain an authorization token of the current session.
Request Parameters
The following parameters must be specified in the URL of the request:
Parameter | Type | Description |
---|---|---|
restoreSessionId | string | Specifies the identification number of the restore session. For more information on how to get this parameter, see Getting Restore Sessions. |
siteId | string | Specifies the identification number of the SharePoint site. For more information on how to get this parameter, see Getting Organization SharePoint Sites. |
documentId | string | Specifies the identification number of the SharePoint document. For more information on how to get this parameter, see Getting SharePoint Documents. |
versionId | integer | Specifies the identification number of the SharePoint document version. For more information on how to get this parameter, see Getting All Versions of SharePoint Document. |
Request Body
None.
Response
The server returns the following response to the client.
Response Codes
A successfully completed operation returns a response code 200 OK.
Response Headers
The response to this request contains the following headers. The response may also include additional standard HTTPS headers.
Header | Description |
---|---|
Content-length | The length of the response body. |
Content-type | The media type and syntax of the response body message: application/json; charset=utf-8 |
Response Body
The response body contains the following properties:
Property | Type | Description |
---|---|---|
sizeBytes | integer | Specifies the size of the SharePoint document version. |
version | string | Specifies the version of the backed-up SharePoint document. |
versionId | integer | Specifies the ID of the document version. |
id | string | Specifies the ID of the document. |
name | string | Specifies the name of the document. |
createdBy | string | Specifies the name of the user account that created the document. |
creationTime | UTC | Specifies date and time when the document was created. |
modifiedBy | string | Specifies the name of the user account that performed the last modification to the document. |
modificationTime | UTC | Specifies date and time when the document was modified. |
_links | Dictionary of string [key] and Object [value] | Links to related resources (navigation property). |
Example
The example returns a resource representation of the specific version of the SharePoint document with the specified ID.
Request: GET https://abc.tech.local:4443/v6/RestoreSessions/0ba45909-ce2d-4457-9a41-c466c21cd1e3/Organization/Sites/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dd/Documents/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88ddd91646d1-5b4a-468f-8d38-7c2eb3cd057248d332e5-c3f9-4373-9902-beac5510d46a/Versions/2
Request Header: Authorization: Bearer <Access-Token>
Response: 200 OK
Response Body: { "sizeBytes": 943, "version": "1.0", "versionId": 2, "id": "7f5501af-a413-45a8-bf39-e5a05ecb2295a247fe95-53b5-4dbf-9451-0a6cd15fce45e5dec81b-801f-4c8c-af40-0a52dc56314f3339eb29-0458-4953-972c-5fa694eee72e", "name": "report.jpg", "createdBy": "System Account", "creationTime": "2021-10-26T15:40:54Z", "modifiedBy": "System Account", "modificationTime": "2021-11-12T08:37:50Z", "_links": { "self": { "href": "/v6/restoresessions/b7f43a7f-3508-4d04-8ec2-ece6944e916b/organization/sites/7f5501af-a413-45a8-bf39-e5a05ecb2295a247fe95-53b5-4dbf-9451-0a6cd15fce45/documents/7f5501af-a413-45a8-bf39-e5a05ecb2295a247fe95-53b5-4dbf-9451-0a6cd15fce45e5dec81b-801f-4c8c-af40-0a52dc56314f3339eb29-0458-4953-972c-5fa694eee72e" }, "parent": { "href": "/v6/restoresessions/b7f43a7f-3508-4d04-8ec2-ece6944e916b/organization/sites/7f5501af-a413-45a8-bf39-e5a05ecb2295a247fe95-53b5-4dbf-9451-0a6cd15fce45/folders/7f5501af-a413-45a8-bf39-e5a05ecb2295a247fe95-53b5-4dbf-9451-0a6cd15fce45e5dec81b-801f-4c8c-af40-0a52dc56314f6cb9b6c2-29c7-49d4-8f84-8ea593ea7969" }, "library": { "href": "/v6/restoresessions/b7f43a7f-3508-4d04-8ec2-ece6944e916b/organization/sites/7f5501af-a413-45a8-bf39-e5a05ecb2295a247fe95-53b5-4dbf-9451-0a6cd15fce45/libraries/7f5501af-a413-45a8-bf39-e5a05ecb2295a247fe95-53b5-4dbf-9451-0a6cd15fce45e5dec81b-801f-4c8c-af40-0a52dc56314f" }, "versions": { "href": "/v6/restoresessions/b7f43a7f-3508-4d04-8ec2-ece6944e916b/organization/sites/7f5501af-a413-45a8-bf39-e5a05ecb2295a247fe95-53b5-4dbf-9451-0a6cd15fce45/documents/7f5501af-a413-45a8-bf39-e5a05ecb2295a247fe95-53b5-4dbf-9451-0a6cd15fce45e5dec81b-801f-4c8c-af40-0a52dc56314f3339eb29-0458-4953-972c-5fa694eee72e/versions" } } } |