在查询URL时,我试图使用Jenkins REST API提取用户的最后登录详细信息https://jenkinsurl/user/someusername/api/json 我收到的回复与下面显示的类似
{
"_class" : "hudson.model.User",
"absoluteUrl" : "https://jenkinsurl/user/someusername",
"description" : null,
"fullName" : "someusername",
"id" : "someusernameid",
"property" : [
{
"_class" : "someProperty1"
},
{
"_class" : "someProperty2"
},
{
"_class" : "org.jenkinsci.plugins.saml.user.LoginDetailsProperty"
},
]
}
现在,我要查找的详细信息位于LoginDetailsProperty下,可以在source here中找到。当我打开user/someusername/configure修改用户详细信息或创建访问令牌时,我已经看到Jenkins UI中使用了详细信息。如何使用REST API扩展LoginDetailsProperty并提取特定用户的LastLoginItemsTamp值
我认为您需要扩展插件代码,以便导出时间戳,如下所示:
相关问题 更多 >
编程相关推荐