简体   繁体   中英

How can we get all the jobs created under a particular project based on node details using Rundeck REST api endpoint

I am new to rundeck and currently using 1.6 version.For one of my usecase i need to get all the job details created under a project to run on a particular node. So basically is there any endpoint available which i can use by passing the project name and the node name to get the all the job details associated with the same. Thanks -Sam

I don't think you will be able to get details of jobs wrt to nodes and I don't think jobs are associated with nodes either. Instead you can get the jobs details associated with a particular project.

leo@leo-local:~$ curl http://localhost:4440/api/14/project/test/jobs?authtoken=*********************
<jobs count='3'>
 <job id='cff77efc-c2ce-4ccf-b366-09d61d15663d' href='http://localhost:4440/api/19/job/cff77efc-c2ce-4ccf-b366-09d61d15663d' permalink='http://localhost:4440/project/test/job/show/cff77efc-c2ce-4ccf-b366-09d61d15663d'>
<name>test1</name>
<group />
<project>test</project>
<description>test1</description>
</job>
<job id='4ca30ee7-c91a-4bc3-92f2-2d10667f0a71' href='http://localhost:4440/api/19/job/4ca30ee7-c91a-4bc3-92f2-2d10667f0a71' permalink='http://localhost:4440/project/test/job/show/4ca30ee7-c91a-4bc3-92f2-2d10667f0a71'>
<name>test2</name>
<group />
<project>test</project>
<description>test2</description>
</job>
<job id='c868ce7c-69e3-4886-be22-11176ade9ca9' href='http://localhost:4440/api/19/job/c868ce7c-69e3-4886-be22-11176ade9ca9' permalink='http://localhost:4440/project/test/job/show/c868ce7c-69e3-4886-be22-11176ade9ca9'>
<name>test3</name>
<group />
<project>test</project>
<description>test3</description>
</job>
</jobs>
leo@leo-local:~$ 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM