I want to just get the "value" field from the actions's parameters from response using the REST API:
value" : "PROJECT.47"
"value" : "PROJECT.54"
I am using following query that gives me the first of the actions but can't just get the value element.
Jenkins API Response:
{
"_class" : "hudson.model.ListView",
"jobs" : [
{
"_class" : "hudson.model.FreeStyleProject",
"displayName" : "Batch_Dep",
"lastBuild" : {
"_class" : "hudson.model.FreeStyleBuild",
"actions" : [
{
"_class" : "hudson.model.ParametersAction",
"parameters" : [
{
"_class" : "hudson.model.StringParameterValue",
"name" : "release",
"value" : "PROJECT.47"
}
]
}
]
}
},
{
"_class" : "hudson.model.FreeStyleProject",
"displayName" : "PROJECT_Execution",
"lastBuild" : {
"_class" : "hudson.model.FreeStyleBuild",
"actions" : [
{
"_class" : "hudson.model.ParametersAction",
"parameters" : [
{
"_class" : "hudson.model.StringParameterValue",
"name" : "release",
"value" : "PROJECT.54"
}
]
}
]
}
},
PS: Referred following posts :
https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API
https://www.cloudbees.com/blog/taming-jenkins-json-api-depth-and-tree