Get or update version control status
Available in versions: 12.56 and later
Note: Versions 2020 and later do not support version control.
Description
Returns or updates the version control status of a test. The status defines if a test is checked-in or checked-out.
URL
/LoadTest/rest/domains/{domainName}/projects/{projectName}/tests/{id}/versioncontrol
Remarks
The data can be passed as XML containing the equivalent data.
HTTP method
GET: Returns the version control state of a test.
PATCH: Updates the version control state of a test.
Request
Headers:
Accept: application/xml
PATCH:
Content-Type: application/xml
Cookies:
Version | Cookie |
---|---|
2020 or later | LWSSO_COOKIE_KEY={LwssoCookie}; |
Earlier than 2020 | LWSSO_COOKIE_KEY={LwssoCookie};QCSession={QCSessionCookie}; |
Request body:
GET: No request body.
PATCH: An XML describing the new version control status in the test. Possible status values are
CheckedIn
andCheckedOut
.
Request examples:
GET /LoadTest/rest/domains/TEST_DOMAIN/projects/TEST_PROJECT/tests/8/versioncontrol HTTP/1.1
Host: PCServer
Cookie: LWSSO_COOKIE_KEY={LwssoCookie};
PATCH /LoadTest/rest/domains/TEST_DOMAIN/projects/TEST_PROJECT/tests/8/versioncontrol HTTP/1.1
Host: PCServer
Cookie: LWSSO_COOKIE_KEY={LwssoCookie};
Content-Type: application/xml
<VersionControl xmlns="http://www.hp.com/PC/REST/API">
<Status>CheckedOut</Status>
<Comments>Reason for checking out</Comments>
</VersionControl>
Response
Headers:
GET.
One of:
Accept: application/xml
Accept: application/json
PATCH: None
Cookies:
None
HTML return code:
One of the HTTP return codes.
Upon successful deletion, returns HTTP status 200 (OK).
HTML body:
GET: Returns the data on the entity in the response.
PATCH: No body returned.
Response example:
<VersionControl>
<Comments>Reason for checking out</Comments>
<Status>CheckedOut</Status>
<VersionNumber>6</VersionNumber>
<UserName>sa</UserName>
<VersionStamp>36</VersionStamp>
</VersionControl>