Unable to POST float fields via API
Robert King
Member Posts: 6
Using Python, I am attempting to add some validation test case (VALTC) items using the Python interface to the REST API.
I have done this successfully with other item/object types with no issues.
I am running into an issue when trying to POST an object which includes a Float field type.
Demo of the issue:
Debug view showing the "min$145" field value is a float (1.8) when passed into the POST method:
Error response from the API:
py_jama_rest_client.client.APIClientException: 400 Client Error. Bad Request. API response message: Could not parse min$145 with the value '1.8' from json. Please verify the value. Cause: Expected different type of value
So my guess is that the API at some level converted the value from a float (1.8) to a str ('1.8') which is disallowed because the Min field type is Float:
So I am unable to create these parameters via the API.
Any help would be great!
------------------------------
Robert King
Skyworks
Austin, TX
------------------------------
I have done this successfully with other item/object types with no issues.
I am running into an issue when trying to POST an object which includes a Float field type.
Demo of the issue:
Debug view showing the "min$145" field value is a float (1.8) when passed into the POST method:
Error response from the API:
py_jama_rest_client.client.APIClientException: 400 Client Error. Bad Request. API response message: Could not parse min$145 with the value '1.8' from json. Please verify the value. Cause: Expected different type of value
So my guess is that the API at some level converted the value from a float (1.8) to a str ('1.8') which is disallowed because the Min field type is Float:
So I am unable to create these parameters via the API.
Any help would be great!
------------------------------
Robert King
Skyworks
Austin, TX
------------------------------
0
Comments
-
Hi Robert,
So that we can take a deeper look into this, can you open a ticket and reference this thread in the ticket description (as well as your version/type of Jama and any other pertinent info) on it, please? Continuing this conversation with our Support team would allow us to exchange information not intended for public viewing, if needed.
------------------------------
Carly Rossi // she/her
Community Manager // Jama Software
Portland, OR
------------------------------
-------------------------------------------
Original Message:
Sent: 10-17-2022 15:18
From: Robert King
Subject: Unable to POST float fields via API
Using Python, I am attempting to add some validation test case (VALTC) items using the Python interface to the REST API.
I have done this successfully with other item/object types with no issues.
I am running into an issue when trying to POST an object which includes a Float field type.
Demo of the issue:
Debug view showing the "min$145" field value is a float (1.8) when passed into the POST method:
Error response from the API:
py_jama_rest_client.client.APIClientException: 400 Client Error. Bad Request. API response message: Could not parse min$145 with the value '1.8' from json. Please verify the value. Cause: Expected different type of value
So my guess is that the API at some level converted the value from a float (1.8) to a str ('1.8') which is disallowed because the Min field type is Float:
So I am unable to create these parameters via the API.
Any help would be great!
------------------------------
Robert King
Skyworks
Austin, TX
------------------------------
0 -
Hi Carly,
Thanks for getting back to me - our Jama support person advised me to do this as well so I filled out a ticket yesterday.
(Edit: I figured out how to log into the support system via Microsoft Edge, wasn't working on Chrome. Just added a link to this thread)
Support request #67208 if this means anything to you.
Cheers!
------------------------------
Robert King
Skyworks
Austin, TX
------------------------------
-------------------------------------------
Original Message:
Sent: 10-20-2022 15:39
From: Carly Rossi
Subject: Unable to POST float fields via API
Hi Robert,
So that we can take a deeper look into this, can you open a ticket and reference this thread in the ticket description (as well as your version/type of Jama and any other pertinent info) on it, please? Continuing this conversation with our Support team would allow us to exchange information not intended for public viewing, if needed.
------------------------------
Carly Rossi // she/her
Community Manager // Jama Software
Portland, OR
------------------------------
Original Message:
Sent: 10-17-2022 15:18
From: Robert King
Subject: Unable to POST float fields via API
Using Python, I am attempting to add some validation test case (VALTC) items using the Python interface to the REST API.
I have done this successfully with other item/object types with no issues.
I am running into an issue when trying to POST an object which includes a Float field type.
Demo of the issue:
Debug view showing the "min$145" field value is a float (1.8) when passed into the POST method:
Error response from the API:
py_jama_rest_client.client.APIClientException: 400 Client Error. Bad Request. API response message: Could not parse min$145 with the value '1.8' from json. Please verify the value. Cause: Expected different type of value
So my guess is that the API at some level converted the value from a float (1.8) to a str ('1.8') which is disallowed because the Min field type is Float:
So I am unable to create these parameters via the API.
Any help would be great!
------------------------------
Robert King
Skyworks
Austin, TX
------------------------------0