Original Message:
Sent: Apr 18, 2025 07:32 AM
From: Nirbhay Kumar
Subject: Edit staff allocationcurve in projects via rest api
Hello Omar,
You would have to include "workEffortUnit". Try the following two approaches, both should work fine :
{ "_internalId": 6659379, "allocationCurve": { "finish": "2025-12-31T17:00:00", "pattern": "uniform", "start": "2025-01-01T00:00:00", "total": 80, "workEffortUnit": "hours" } }
OR
{"_internalId": 6659379,"defaultAllocationPercent": 0,"allocationCurve": { "isFiscal": false, "curveType": "value", "dataType": "numeric", "_type": "tsv", "workEffortUnit": "hours", "segmentList": { "defaultValue": 0, "segments": [ { "start": "2025-01-01T00:00:00", "finish": "2025-12-31T17:00:00", "value": 80 } ] } }}
Original Message:
Sent: Apr 16, 2025 06:29 PM
From: Omar TAHRI
Subject: Edit staff allocationcurve in projects via rest api
Hi all,
i'm trying to edit allocationcurve from staff in a project using rest api with a simple process, however the expected result in the UIX is not correct i am getting 261 instead 10 :
i'm trying to send 288000 s ( 10 manday). Here is a part of the script:
<core:set var="REST_URL">/projects/6064011/teams/6659379</core:set>
<core:set escapeText="false" var="JSON_DATA">
{
"_internalId": 6659379,
"allocationCurve": {
"isFiscal": false,
"curveType": "value",
"dataType": "numeric",
"_type": "tsv",
"segmentList": {
"defaultValue": 0,
"segments": [
{
"start": "2025-01-01T00:00:00",
"finish":"2025-12-31T00:00:00",
"value": 288000
}
]
}
}
}
</core:set>
do you have any idea to resolve this problem ?
thank you