3.1.4.11 Versioning Subrequest

This operation is used to request information on versions of a file or different types of versioning related operations on a file from the protocol server.<61> Depending on the VersioningRequestType attribute value, the protocol server interprets the request as one of the following types of versioning operations:

  • Get Version List

  • Restore Version

The VersioningRequestType attribute is defined in section 2.3.3.9. The SubRequestData element for a versioning subrequest is of type VersioningSubRequestDataType and is defined in section 2.3.1.36.

The protocol client sends a versioning SubRequest message, which is of type VersioningSubRequestType as specified in section 2.3.1.36. The protocol server responds with a versioning SubResponse message, which is of type VersioningSubResponseType as specified in section 2.3.1.39. This is done as follows:

  • The protocol client prepares a request containing a URL for the file, a unique Request token, and one or more SubRequest elements, as defined in section 2.2.3.2 and section 2.2.3.8. The SubRequest element is of type "Versioning" and the SubRequestData element contains attributes that are input parameters used by the protocol server when processing the versioning subrequest. The SubRequestData element is of type VersioningSubRequestDataType and is defined in section 2.3.1.36.

  • The protocol server receives the request, parses the logic, and depending on the type of versioning subrequest, processes the request as specified in section 3.1.4.11.1 or section 3.1.4.11.2.

  • The Response element is defined in section 2.2.3.5, and the SubResponse element is defined in section 2.2.3.10. The VersioningSubResponseDataType defines the type of the SubResponseData element inside the Versioning SubResponse element. The VersioningSubResponseDataType is defined in section 2.3.1.38.

  • The protocol server returns results based on the following conditions:

    • Depending on the type of error, the ErrorCode is returned as an attribute of the SubResponse element. The ErrorCode attribute that is part of the SubResponse element is updated with a specific error code as specified in section 2.2.5.4.

    • If the protocol server was unable to find the URL for the file specified in the Url attribute, the protocol server reports a failure by returning an error code value set to "FileNotExistsOrCannotBeCreated" in the ErrorCode attribute sent back in the SubResponse element.

    • If the protocol server gets a versioning subrequest of type "Restore version" and the restore fails because the version number specifies a non-existent version, the protocol server returns an error code value set to "VersionNotFound".

    • An ErrorCode value of "Success" indicates success in processing the versioning request.