We loaded thousands of resource requests from our legacy system. They get loaded in DRAFT state
if we open each one up in the gui, we can change to approve, but we want to do in bulk.
I tried two API endpoints - upsert and lifecycle - both give me errors as per below.
Any suggestions?
curl -X POST -H "Authorization: ApiKey <mykey>” -d "{ \"insertEntity\": { \"Id\": \"/ResourceRequest/PRJ-2021070-4188\" }, \"updateEntity\": { \"Id\": \"/ResourceRequest/PRJ-2021070-4188\", \"State\": \"Approved\"} }" https://api.clarizentb.com/v2.0/services/data/upsert
{
"errorCode": "InvalidOperation",
"message": "Invalid operation: Field 'State' cannot be updated. The field is marked 'read-only'.",
"referenceId": "aUUZVulHnmM3TVRcbGnWL"
curl -X POST -H "Authorization: ApiKey <mykey>" -d "{ \"ids\": [\"/ResourceRequest/1m1uhgc3tyeo5arom0a170nz02512\"], \"operation\":\"Approve\"}" https://api2.clarizen.com/V2.0/services/data/Lifecycle
Response:
{
"errorCode": "Unauthorized",
"message": "You don't have permission to Approve this object\r\n",
"referenceId": "2kf25Ubp8qsAUP0VBTowYX"
}