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.

  • 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.

  • 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.




  • 0   in reply to 
            <h1>Failed to check-in requirement with id 754, the entity is not checked-out by&#x3a; automationuiuser</h1>
    See the message, looks like you were trying to check in using different user. If that's the case, it's invalid operation.
    If issue is still there to check in using same user, please query VC_REQ table by RQ_REQ_ID = 754 and attach the query result here.
  • 0 in reply to   

    Thanks for the reply,

    First I created new requirement with ID 829

    Then I tried to check out with the API via automationsyncuser:

    curl --location 'IP:PORT/.../check-out' \
    --header 'Content-Type: application/json' \
    --header 'X-XSRF-TOKEN: 3690df82919d69277ee5aeeb08d2b5cce38061a3435884f0c8528967084e4985' \
    --header 'Cookie: ALM_USER=996830b46ec38fa0d3a8d7303c83473dd3ec7d82d891154ab5b1c0bd47d5ce74; JSESSIONID=node018jbq86vqwot181hobox3qzb61094.node0; LWSSO_COOKIE_KEY=UZmaBednn0WT0OLnttlUCYU2o_Yai2Hvv2TCqXAGhGw-zPD_wodXhB5P7kt39cXA0m4yODczMk2cNui1Wktgsb82b71QIVgwgMEBe_S-XzZGwXdUYieC2pPDYyJsvqW5l5-C17rga-Cjazhy4d-JClCyRd28LudGk7EXaVnsq5w_kyK1A-YpHpzCN_nKv4dNE1eBJL78gH8Qx-ZpxkizDPwCCfDCZrH7tdIpDC4QsJ9Nee3bOsB3B4NUS-gw9N8BQPaHmHLxvEvolVYKc22k7lqU0ig8_5ph92TC4ISEVVo.; QCSession=MjA0NDQ2O0FZcFVrOFAxK2lMZXBJazNweStjVncqKjtSRVNUIGNsaWVudDsgOyA7IA..; XSRF-TOKEN=3690df82919d69277ee5aeeb08d2b5cce38061a3435884f0c8528967084e4985' \
    --data '{
        "CheckOutParameters": {
            "Comment": "check in from rest",
            "OverrideLastVersion": "false"
        }
    }'

    I got the response:

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

    <head>
        <title>Failed to check-out requirement with id 829, the entity is already checked-out by&#x3a; automationsyncuser
        </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-out requirement with id 829, the entity is already checked-out by&#x3a; automationsyncuser
            </h1>
            <div>
                <tr>
                    <td><a id="exception-id-title">Exception Id:</a></td>
                    <td>qccore.check-out-failure</td>
                </tr>
            </div>
            <a id="more-details-label" style="display:block" href="#" onClick="javascript:toggleDetails()">
                <h3>Show Details</h3>
            </a>
            <div id="details-holder" style="display:none">
                <div style="display:block">
                    <h4>Exception Properties:</h4>
                    <div>CheckOutUser&#x3a; automationsyncuser</div>
                </div>
                <div style="display:none">
                    <h4>Stack Trace:</h4>
                    <div></div>
                </div>
            </div>
        </div>
    </body>

    </html>

    In the database the result of the query 

    SELECT * FROM VC_REQ WHERE RQ_REQ_ID=829

    was

    "RQ_VC_CHECKOUT_USER_NAME","RQ_REQ_ID","RQ_FATHER_ID","RQ_ORDER_ID","RQ_ISTEMPLATE","RQ_REQ_COMMENT","RQ_REQ_REVIEWED","RQ_REQ_PATH","RQ_REQ_STATUS","RQ_REQ_PRIORITY","RQ_REQ_TYPE","RQ_REQ_PRODUCT","RQ_REQ_NAME","RQ_REQ_AUTHOR","RQ_RBT_IGNORE_IN_ANALYSIS","RQ_RBT_BSNS_IMPACT","RQ_RBT_CUSTOM_BSNS_IMPACT","RQ_RBT_USE_CUSTOM_BSNS_IMPACT","RQ_RBT_EFFECTIVE_BSNS_IMPACT","RQ_RBT_FAIL_PROB","RQ_RBT_CUSTOM_FAIL_PROB","RQ_RBT_USE_CUSTOM_FAIL_PROB","RQ_RBT_EFFECTIVE_FAIL_PROB","RQ_RBT_RISK","RQ_RBT_CUSTOM_RISK","RQ_RBT_USE_CUSTOM_RISK","RQ_RBT_EFFECTIVE_RISK","RQ_RBT_FUNC_CMPLX","RQ_RBT_CUSTOM_FUNC_CMPLX","RQ_RBT_USE_CUSTOM_FUNC_CMPLX","RQ_RBT_EFFECTIVE_FUNC_CMPLX","RQ_RBT_TESTING_LEVEL","RQ_RBT_CUSTOM_TESTING_LEVEL","RQ_RBT_TESTING_HOURS","RQ_RBT_CUSTOM_TESTING_HOURS","RQ_RBT_USE_CUSTOM_TL_AND_TE","RQ_RBT_RND_ESTIM_EFFORT_HOURS","RQ_RBT_ASSESSMENT_DATA","RQ_RBT_ANALYSIS_PARENT_REQ_ID","RQ_RBT_ANALYSIS_SETUP_DATA","RQ_RBT_ANALYSIS_RESULT_DATA","RQ_RBT_LAST_ANALYSIS_DATE","RQ_USER_01","RQ_USER_02","RQ_USER_03","RQ_USER_04","RQ_USER_05","RQ_USER_06","RQ_USER_07","RQ_USER_08","RQ_USER_09","RQ_USER_10","RQ_USER_11","RQ_USER_12","RQ_REQ_VER_STAMP","RQ_ATTACHMENT","RQ_REQ_DATE","RQ_REQ_TIME","RQ_NO_OF_SONS","RQ_IS_FOLDER","RQ_VTS","RQ_USER_13","RQ_USER_14","RQ_USER_15","RQ_USER_16","RQ_USER_17","RQ_USER_18","RQ_USER_19","RQ_USER_20","RQ_USER_21","RQ_USER_22","RQ_USER_23","RQ_USER_24","RQ_REQUEST_ID","RQ_TEXT_SYNC","RQ_REQUEST_SERVER","RQ_REQUEST_TYPE","RQ_REQUEST_STATUS","RQ_REQUEST_UPDATES","RQ_REQUEST_ASSIGN_TO","RQ_REQUEST_NOTE","RQ_TYPE_ID","RQ_TARGET_RCYC_VARCHAR","RQ_TARGET_REL_VARCHAR","RQ_TARGET_RCYC","RQ_TARGET_REL","RQ_DEV_COMMENTS","RQ_HAS_RICH_CONTENT","RQ_VC_VERSION_NUMBER","RQ_VC_STATUS","RQ_VC_CHECKIN_USER_NAME","RQ_VC_CHECKIN_DATE","RQ_VC_CHECKIN_TIME","RQ_VC_CHECKIN_COMMENTS","RQ_VC_CHECKOUT_DATE","RQ_VC_CHECKOUT_TIME","RQ_VC_CHECKOUT_COMMENTS","RQ_REQ_RICH_CONTENT"
    "automationsyncuser","829","0","15","0","","Not Reviewed","AAAAAO","Not Covered","","","","test check OUT","automationsyncuser","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","2","","2025-01-16 00:00:00","22:54:35","0","N","2025-01-16 22:54:35","","","","","","","","","","","","","","","","","","","","","0","","","","","","","1","Checked_In","automationsyncuser","2025-01-16 22:54:35","22:54:35","Auto generated first version","2025-01-16 22:54:35","22:54:35","",""


  • 0   in reply to 

    Currently requirement 829 is on Checked Out status, please try to check in using user automationsyncuser

  • 0 in reply to   

    In check in API:

    curl --location 'IP:PORT/.../check-in' \
    --header 'X-XSRF-TOKEN: 3690df82919d69277ee5aeeb08d2b5cce38061a3435884f0c8528967084e4985' \
    --header 'Content-Type: application/json' \
    --header 'Cookie: ALM_USER=e0268f889d7fc0150be2a7282308f964c94ffec85ae5d249981845bf714c40b0; JSESSIONID=node0w1qpopsz9ppw1l0p9zcdop93311678.node0; LWSSO_COOKIE_KEY=ho_fWFN1vgNPQbvsbqoJveKr0I6Z5fz19UyjMGTg7skHDb4nDvtdEAOu8o4Y_NrbvEeBRcOrNwVicOvH6lQYO_wobhdqgRqZU3eg5Dwyg0CN1i6_2ypXJWT7HPDQzi46NjsNzMuzw-4obPU7iaa4S0iooLNOKwzKOsByk5RAA3EhTw6xmVmmfoyOYDL5fqr4iCMwIbAnsswygT-724k-aoOYlBL9eaMNQs3EBNs94jRHGICRrksc2-a6dyPOHohmn_ffeb85IGfxL27tfVKaU-kHEDyGY5vaaAxCHq1vJ0M.; QCSession=MjA2NTY1O2RzbTBacXFuRDQ1SlYyMU1SMkEzdWcqKjtSRVNUIGNsaWVudDsgOyA7IA..; XSRF-TOKEN=3690df82919d69277ee5aeeb08d2b5cce38061a3435884f0c8528967084e4985' \
    --data '{
        "CheckInParameters": {
            "Comment": "check in from rest",
            "OverrideLastVersion": "false"
        }
    }'

    it gives this response:

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

    <head>
        <title>Failed to check-in requirement with id 829, the entity is not checked-out by&#x3a; automationsyncuser</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 829, the entity is not checked-out by&#x3a; automationsyncuser</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>


    From UI of web client ALM QC gives this notification,




    But there is not notification regarding this in desktop client.
  • 0   in reply to 

    Web Client doesn't support VC feature now, you can run ALM client by ALM launcher, there you can see the details. 

    Btw, are you using ALM API key to perform the operation ?  Or are you sure you are using the same user to check in ? I suggest you open one CPE case, then we can have a call to trouble shotting more efficiently.

  • 0 in reply to   

    I am using the same user to perform all this operations

  • 0 in reply to   

    Hi, Charley could you tell the where I can raise the CPE ticket. Do I have to purchase any thing for this or not.