How can I edit (e.g.: remove) the Total Allocation from Staff using the REST API?
Clarity 16.2.2
Perform the following steps:
GET
https://<hostname>/ppm/rest/v1/obaStaffs?filter=(+(investment+=+5000001)+)&limit=100
You must also add this as part of the Request Header:
x-api-association-key
: obaStaffs~resources~base_object_only
You will receive a response like:
{
"_pageSize": 100,
"_self": "<hostname>/ppm/rest/v1/obaStaffs?filter=(+(investment+=+5000001)+)&limit=100",
"_metadata": {},
"_totalCount": 1,
"_results": [
{
"_internalId": 5006000,
"resources____uniqueName": "cherylAmos",
"_self": "<hostname>/ppm/rest/v1/obaStaffs/5006000",
"resources____fullName": "Amos, Cheryl"
}
],
"_recordsReturned": 1
}
(If you have more than one resource, you will get more results)
PATCH
https://<hostname>/ppm/rest/v1/obaStaffs
In the Request Header, include:
x-api-association-key
: obaStaffs~resources~base_object_only
Body: (raw/JSON) - replace 5006000
with the staff ID that you receive in the previous step:
{
"d": [
{
"allocationCurve": {
"workEffortUnit": "hours",
"pattern": "uniform",
"total": 0
},
"_internalId": 5006000
}
]
}