Workspace existence

37 views
Skip to first unread message

KUSHAL MUDDANA

unread,
Mar 12, 2026, 3:31:36 AMMar 12
to Jenkins Developers
 I have a question about Jenkins REST APIs. Is there a way to determine whether the workspace for a specific build still exists on the Jenkins server? Specifically, can the workspace existence for a particular build be checked through the Jenkins REST API?  

Winter, Markus

unread,
Mar 16, 2026, 4:47:42 AMMar 16
to jenkin...@googlegroups.com
Workspaces are not build specific.
The workspace is reused from build to build when you have regular agents. When more than one agent is able to execute the same project than, it can be that you have on each agent a workspace for different builds. Jenkins might clean unused workspaces after a while.
When you provision agents dynamically from a cloud and you've set them up to be used just once the workspace stops existing after each build usually.
You should attach important things as artifacts to your builds if they should not be overwritten by the next build.
Also consider that pipeline jobs can use more than one workspace when they run several steps on different agents (e.g. to compile on different architectures).

So there is no dedicated API to check if the workspace exists.



From: jenkin...@googlegroups.com <jenkin...@googlegroups.com> on behalf of KUSHAL MUDDANA <dev4k...@gmail.com>
Sent: Thursday, March 12, 2026 7:43 AM
To: Jenkins Developers <jenkin...@googlegroups.com>
Subject: Workspace existence

You don't often get email from dev4k...@gmail.com. Learn why this is important
 I have a question about Jenkins REST APIs. Is there a way to determine whether the workspace for a specific build still exists on the Jenkins server? Specifically, can the workspace existence for a particular build be checked through the Jenkins REST API?  
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jenkinsci-dev/5299f7d4-526f-4a55-9751-49ba93c3b6d9n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages