I've been trying to delete Hour objects through the API in the following ways:
GET method - Result: Works XXX.attasksandbox.com/attask/api/v5.0/hour/573096fb00152568df628b6fdd1fb158?method=delete&sessionID=YYY
GET method (bulk delete) - Result: Does not work XXX.attasksandbox.com/attask/api/v5.0/hour?method=DELETE&updates=[{"ID":"573321d400074f30b52cd4fcbb07f23a"}]&sessionID=YYY
DELETE method - Result: Does not work /attask/api/v5.0/hour/573321d400074f30b52cd4fcbb07f23a&sessionID=YYY
I was only able to delete the object with the first method succesfully. For the two other requests I got the following message:
Access to the specified resource (Access to the requested resource has been denied) has been forbidden.
I got this error message, with and without adding the sessionID.
Why does this occur? I'm particularly interested in getting the bulk delete work to reduce calls and to benefit from the transaction feature.
Also, in the manual, section "DELETE behavior" the introductory text (1) says:
In every case, the URI may include the parameter force=true to cause the server to remove the specified data and its dependants
What are its "dependants" in this case? Would adding force=true mean that the referenced timesheet would be deleted as well?
you can do a bulk delete by making either of the following calls.
DELETE method /attask/api/v5.0/hour?ID=ID_ONE,ID_2,...&sessionID=YYY
GET method /attask/api/v5.0/hour?method=DELETE&ID=ID_ONE,ID_2,...&sessionID=YYY