Job api to create jobs inside a folder
See original GitHub issueCurrently, the job Api to create a job is as follows
This API creates a job in jenkins root folder but not inside a folder.
Perhaps, we can add another API to with a pathparam like @Path("{pathToJob}/createItem")
to support the creation of jobs inside a folder.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Create a job in Jenkins (or folder) using the HTTP API · GitHub
Create a job in Jenkins (or folder) using the HTTP API - CreateJob.sh.
Read more >Jenkins api create job in a folder - Google Groups
I'm using the scriptler plugin to write a groovy script using the Jenkins api, that will clone a set of jobs. With jenkins.model.Jenkins....
Read more >Create a job in Jenkins (or folder) using the HTTP API
We empower you and your team to get more done, faster · Create a job in Jenkins (or folder) using the HTTP API....
Read more >How to create a job using the REST API and cURL?
First, create a job using the UI. This job can be used to create a base config that can be used to create...
Read more >(In Jenkins) How to build job which is inside folder using ...
I moved job "BuildThemAll" to root of Jenkins. This way, I could trigger using API. Now in configuration of this job, I kept...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great idea. I need this too. Thanks @Dhivyaa21 and @cdancy
@cdancy This looks good. I am adding tests to this change. Meanwhile, a quick question. Do you think its a good idea to use this
OPTIONAL_FOLDER_PATH_PARAM
for all the job APIs? i am not sure if the other job APIs were designed to access jobs in a folder.Right now we squeeze in the path to job in the
{name}
path parameter of other APIs. It works fine. It was just the create API that did not have a way to create the job in a folder. Hence, I created this issue.Example - Say I want to disable a job in the following path
Disable job api is https://github.com/cdancy/jenkins-rest/blob/e17624716ace749dd7865601bda6648a801198bf/src/main/java/com/cdancy/jenkins/rest/features/JobsApi.java#L131-L136
To disable the job , I’ll have to call
api().disable("folder/job/testJob")
and notapi().disable("testJob")
.