Update Cost Plan Dtetails TSV value using REST API
search cancel

Update Cost Plan Dtetails TSV value using REST API

book

Article ID: 272865

calendar_today

Updated On:

Products

Clarity PPM On Premise

Issue/Introduction

When updating a  Cost Plan Detail Time-varing(Number) field using REST API we are getting error if we use the value as .4, but when we use 0.4 it worked.

We are using as 0.4 now, but would like to understand why it failed.

Ex: 

{"_internalId":7260866,
"z_xxxt":{"segmentList":{"segments":[{"start":"2023-10-01T00:00:00","finish":"2024-09-30T00:00:00","value":.4}]}}
}

Error:

{
   "resourceId": null,
   "httpStatus": "400",
   "errorMessage": "Could not parse json data to Map.",
   "errorCode": "Could not parse json data to Map."
}

 

Environment

Release : 16.1.1

Resolution

When updating the time-varying attribute you need to use syntax such as 0.4

 

If you check the response in developer tools when you enter ..4 in the UI TSV cost plan details you will see it posts as 0.4

Therefore your Rest API needs to contain the leading 0 on a decimal value.

Here is the example of the post when entering .2 in the UI.  The value =0.2