Quality Center / ALM Practitioners Forum
cancel

HP QC ALM - REST API - Defect creation issue

SOLVED
Go to solution
Karthick Raju
Valued Contributor.

HP QC ALM - REST API - Defect creation issue

Hi All,

I am trying to create new defect. I am using the rest api url : qcbin/rest/domains/TESTDOMAIN/projects/TESTPROJECT/defects

Below is my request body :

<?xml version="1.0" encoding="UTF-8"?>
<Entity Type="defect">
  <Fields>  
    <Field Name="priority">
      <Value>3-High</Value>
    </Field>
    <Field Name="description">
      <Value>test description</Value>
    </Field>
    <Field Name="name">
      <Value>test with rest api</Value>
    </Field>    
    <Field Name="creation-time">
      <Value>2011-08-16 11:34:08</Value>
    </Field>
  </Fields>
</Entity>

 

I can successfully create the defect only if I do not use 'creation-time' in XML. May I know how to use columns that contain hyphen?

I am facing this hyphen column problem when updating Test table column also. So, please let me know how to use hyphen contain column

2 REPLIES
Damodar-Reddy
Acclaimed Contributor.
Solution

Re: HP QC ALM - REST API - Defect creation issue

API does accept Hyphen.

Use the below format for creation time, leave the Time stamp, just input the date:

<Field Name="creation-time">
            <Value>2017-11-13</Value>
        </Field>
(If this helped, accept as solution )
(Posts and opinions made here are my own and do not reflect the opinions of my employer)
Karthick Raju
Valued Contributor.

Re: HP QC ALM - REST API - Defect creation issue

Hi Damodar,

 

Yes right, I could create only with Date. But, how to create along with time stamp?

 

-KR