简体   繁体   English

我们如何使用Rundeck REST api端点获取基于节点详细信息的特定项目下创建的所有作业

[英]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. 我是rundeck的新手,当前使用1.6版本。对于我的一个用例,我需要获取在项目下创建的所有作业详细信息才能在特定节点上运行。 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:~$ 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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