Version control API for check out and check in gives 500 status code in version 24.1

Hi,

I am using the HP ALM QC version 24.1 via rest API.

While updating the requirement I call the check out API first.
Then after updation I call check in API.

But check in and out API gives me 500 status code.

For example:  Failed to check-out requirement with id 63. or Failed to check-in requirement with id 63

Thanks.

Parents
  • 0  

    Check out :

    post  -> http://<hostname>:<port>/qcbin/rest/domains/<domainName>/projects/<projectName>/requirements/63/versions/check-out

    Check In :

    post  -> http://<hostname>:<port>/qcbin/rest/domains/<domainName>/projects/<projectName>/requirements/63/versions/check-in

    request body:

    {
        "CheckInParameters": {
            "Comment""check in from rest",
            "OverrideLastVersion""false"
        }
    }

    Please try this. 

    If you still get error, please share more error messages.

Reply
  • 0  

    Check out :

    post  -> http://<hostname>:<port>/qcbin/rest/domains/<domainName>/projects/<projectName>/requirements/63/versions/check-out

    Check In :

    post  -> http://<hostname>:<port>/qcbin/rest/domains/<domainName>/projects/<projectName>/requirements/63/versions/check-in

    request body:

    {
        "CheckInParameters": {
            "Comment""check in from rest",
            "OverrideLastVersion""false"
        }
    }

    Please try this. 

    If you still get error, please share more error messages.

Children
  • 0 in reply to   

    With post man I hit this API:

    curl
    --location 'IP:PORT/.../check-in' \
    --header 'X-XSRF-TOKEN: a12264bf483ae83c0baea88e48a6b6f5232c91dccc7a342b8822fe6496a...tokendata' \
    --header 'Content-Type: application/json' \
    --header 'Cookie: ALM_USER=996830b46ec38fa0d3a8d7303c83473dd3ec7d82d891154ab5b1c0bd47d5ce74; JSESSIONID=node01uccjdbz4arox1y0peax2er96u911.node0; LWSSO_COOKIE_KEY=6k5jYm4Hi2chwd1Bj8GEY5odA27bRwWhKZhyF1v5qkw-I_zURjv2mXpvpMTm0WXT9YxtU17p2zVbvTkchqvFHmscqUysw6w-G-LHpVVDeNEACuRPErj_5RJPIoX3XFvRx8eMMhoLQe-ZwOan_4KxBvrhr7PepTs9UbUaDwo1-_qJp60PaJBHNucrzqCiG5heyFdQ66pMI3jE7PUwt3nU-zT5jdThk1DN38gDrRzGRWF6zaECqq6sZcAmgHeUoOgPotK_kZt3_lNwRLe0axaMi_xrHaoMVExaADB71WxGNMM.; QCSession=MTg2NDIzO0p6ZWN1LUduc2FzVWhOc2ZlT1N5dmcqKjtSRVNUIGNsaWVudDsgOyA7IA..; XSRF-TOKEN=a12264bf483ae83c0baea88e48a6b6f5232c91dccc7a342b8822fe6496a44af1' \
    --data '{
        "CheckInParameters": {
            "Comment": "check in from rest",
            "OverrideLastVersion": "false"
        }
    }'

    But getting the Error with 500 status code.


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "">www.w3.org/.../strict.dtd">
    <html>

    <head>
        <title>Failed to check-in requirement with id 754, the entity is not checked-out by&#x3a; automationuiuser</title>
        <link rel="stylesheet" type="text/css" href="/qcbin/rest-exception/rest-exception.css" />
        <script type="text/javascript" src="/qcbin/rest-exception/rest-exception.js"></script>
    </head>

    <body>
        <div id="banner">
            <img src="/qcbin/rest-exception/product_logo.png" id="banner-logo"/>
            <h3 id="banner-title">OpenText Application Lifecycle Management</h3>
        </div>

        <div id="content-holder">
            <h1>Failed to check-in requirement with id 754, the entity is not checked-out by&#x3a; automationuiuser</h1>
            <div>
                <tr>
                    <td><a id="exception-id-title">Exception Id:</a></td>
                    <td>qccore.check-in-failure</td>
                </tr>
            </div>
            <a id="more-details-label" style="display:none" href="#" onClick="javascript:toggleDetails()">
                <h3>Show Details</h3>
            </a>
            <div id="details-holder" style="display:none">
                <div style="display:none">
                    <h4>Exception Properties:</h4>
                    <div></div>
                </div>
                <div style="display:none">
                    <h4>Stack Trace:</h4>
                    <div></div>
                </div>
            </div>
        </div>
    </body>

    </html>

    Same things happens for check out also.