Я пытаюсь получить всех пользователей в jenkins с помощью api.
Например, я нажал следующую команду в почтальоне, и он показывает мне все задания в jenkins.
Url = 192.168.195.150:8080/api/json?pretty=true
Результат:
{
"_class": "hudson.model.Hudson",
"assignedLabels": [
{
"name": "master"
}
],
"mode": "NORMAL",
"nodeDescription": "the master Jenkins node",
"nodeName": "",
"numExecutors": 2,
"description": null,
"jobs": [
{
"_class": "hudson.model.FreeStyleProject",
"name": "Apache_kafka_Consumer_Info",
"url": "http://192.168.192.198:8080/job/Apache_kafka_Consumer_Info/",
"color": "blue"
},
{
"_class": "hudson.model.FreeStyleProject",
"name": "Apache_Kafka_Zookeeper_Start",
"url": "http://192.168.192.198:8080/job/Apache_Kafka_Zookeeper_Start/",
"color": "red"
},
{
"_class": "hudson.model.FreeStyleProject",
"name": "Apache_Kafka_Zookeeper_Status",
"url": "http://192.168.192.198:8080/job/Apache_Kafka_Zookeeper_Status/",
"color": "blue"
},
{
"_class": "hudson.model.FreeStyleProject",
"name": "AWS_Lambda",
"url": "http://192.168.192.198:8080/job/AWS_Lambda/",
"color": "blue"
},
{
"_class": "hudson.model.FreeStyleProject",
"name": "Input_Validation",
"url": "http://192.168.192.198:8080/job/Input_Validation/",
"color": "blue"
},
{
"_class": "hudson.model.FreeStyleProject",
"name": "loginserver-CI",
"url": "http://192.168.192.198:8080/job/loginserver-CI/",
"color": "blue"
},
{
"_class": "hudson.maven.MavenModuleSet",
"name": "loginserver-CI-1",
"url": "http://192.168.192.198:8080/job/loginserver-CI-1/",
"color": "blue"
},
{
"_class": "hudson.maven.MavenModuleSet",
"name": "loginserver-CI-2",
"url": "http://192.168.192.198:8080/job/loginserver-CI-2/",
"color": "blue"
},
{
"_class": "hudson.maven.MavenModuleSet",
"name": "loginserver-CI-3",
"url": "http://192.168.192.198:8080/job/loginserver-CI-3/",
"color": "blue"
},
{
"_class": "hudson.model.FreeStyleProject",
"name": "M_test",
"url": "http://192.168.192.198:8080/job/M_test/",
"color": "blue"
},
{
"_class": "hudson.model.FreeStyleProject",
"name": "parameter",
"url": "http://192.168.192.198:8080/job/parameter/",
"color": "blue"
},
{
"_class": "hudson.model.FreeStyleProject",
"name": "Remote_Deploy",
"url": "http://192.168.192.198:8080/job/Remote_Deploy/",
"color": "blue"
},
{
"_class": "hudson.model.FreeStyleProject",
"name": "Remote_Deploy_1",
"url": "http://192.168.192.198:8080/job/Remote_Deploy_1/",
"color": "blue"
},
{
"_class": "hudson.model.FreeStyleProject",
"name": "Tomcat_Status",
"url": "http://192.168.192.198:8080/job/Tomcat_Status/",
"color": "yellow"
},
{
"_class": "hudson.model.FreeStyleProject",
"name": "Version_Check",
"url": "http://192.168.192.198:8080/job/Version_Check/",
"color": "blue"
}
],
"overallLoad": {},
"primaryView": {
"_class": "hudson.model.AllView",
"name": "all",
"url": "http://192.168.192.198:8080/"
},
"quietingDown": false,
"slaveAgentPort": -1,
"unlabeledLoad": {
"_class": "jenkins.model.UnlabeledLoadStatistics"
},
"useCrumbs": true,
"useSecurity": true,
"views": [
{
"_class": "hudson.model.AllView",
"name": "all",
"url": "http://192.168.192.198:8080/"
}
]
}
Как мне изменить этот URL, чтобы я мог перечислить всех пользователей в Jenkins?
Было бы лучше, если бы он перечислял права пользователей вместе с заданиями, назначенными каждому пользователю.