0

I am trying to delete a WorkItem using forge-api-nodejs-client.

Here's my code:

WorkItemsApi.deleteWorkItem(workItemId, oAuthTwoLegged, oAuthTwoLegged.getCredentials());

I get a 404 response telling me that the requested resource does not exist.

I've tried the endpoint using curl, and Postman, and I'm pretty sure my requests are formatted correctly. I've checked the API Health Dashboard and it all looks good.

Is this endpoint still a thing?

1 Answers1

1

The V2 API does not have a DELETE workitems/{id} action. The V3 API has this.

Albert Szilvasy
  • 461
  • 3
  • 5
  • I am surprised to learn that because the online documentation for V2 says otherwise. It says that the endpoint is `DELETE https://developer.api.autodesk.com/autocad.io/us-east/v2/WorkItems(‘:id’)` and there is no mention of removing it in the changelog. – Andrew McEwen Feb 01 '19 at 16:39
  • I apologize for the confusion. This appears to be a documentation defect. We never had a DELETE /workitems(':id') endpoint. This was introduced in V3. – Albert Szilvasy Feb 02 '19 at 18:03
  • It happens. Thanks for the info. By any chance, are work items automatically deleted after an amount of time? – Andrew McEwen Feb 04 '19 at 22:42
  • Yes, we only retain workitem records for 30 days in V2 and we reduced this to 3 days in V3. – Albert Szilvasy Feb 11 '19 at 21:53