1

Can anyone help me as my HP QC Update comment API is returning http_code: 401 which is "user not authenticated". But I am sending the request after login only. The flow is as below:

  1. I hit qcbin/api/authentication/sign-in API which stores LWSSO_COOKIE_KEY, QCSession, ALM_USER and XSRF-TOKEN on my browser and temp file.

  2. Then I am calling qcbin/rest/domains/domain_name/projects/project_name//defects/{id}

This time it returns 401

But in the same way I am able to create new defects.

Thank you.

Rick31
  • 89
  • 12
Biswajit
  • 81
  • 1
  • 2
  • What does it mean "I am calling"? Is it a POST action? In particular if you want to UPDATE a defect, then you should use PUT instead of POST. – Marco smdm Jun 22 '17 at 11:42

1 Answers1

0

If you want to UPDATE a defect, then you should use PUT instead of POST!

The POST is used to create a new defect, a PUT to update. Please refer always to the HP ALM library in order to be sure which action to follow.

Last but not least you have to send back in the header the LSSWO-Cookie in order to keep the authentication, but this should be already ok if you say that you can create or send other kind of action.

Please try to use the PUT to update and have a nice day!

Marco smdm
  • 1,020
  • 1
  • 15
  • 25