I’d like to delete the data for a specific build so that is wiped out and removed from the UI.
From what I googled, I got the impression that I need to call do a DELETE on URL http://<jenkins URL>/job/<job name>/<jobNo>/
But that did not do it. I’m suspicious I may have to confirm the deletion - is that right?
My problem is that I’m not finding a good doc on the API - and I don’t want to rely on Google (or AI) alone - stuff on the web is based on a variety of versions and may not reflect “best practices” etc…
In the past I would have suggested to delete the folder for the build on the disk of the controller and run the reload from disk method but I would recommend against that shortcut nowadays.
The reason is that the Delete action can now have side effects that will garbage collect other data in other places. For example we use the S3 Artifacts plugin so skipping the API to delete will not garbage collect the artifacts on S3, and you end up with increasing monthly costs on data you do not want to preserve.
The fact that sending an HTTP DELETE request to the job url is not working is probably a bug. If you add /api/ to any job url it show documentation explicitly stating:
Delete a job
To programmatically delete this job, send an HTTP DELETE request to this URL.