I have this command line to dispaly the YARN policy:
The result is:
{
"id": 131,
"guid": "4d9c3257-0998-42ea-8506-f773a368430d",
"isEnabled": true,
"version": 2,
"service": "Namecluster_yarn",
}
},
"policyItems": [
{
"accesses": [
{
"type": "submit-app",
"isAllowed": true
}
],
"users": [],
"groups": [
"Application_Team_1"
],
"conditions": [],
"delegateAdmin": false
}
],
"denyPolicyItems": [],
"allowExceptions": [],
"denyExceptions": [],
"dataMaskPolicyItems": [],
"rowFilterPolicyItems": []
}
I would like recover just the list of the groups (in my case I have just one group is Application_Team_1).
How can I recover the list of groups via the API REST or shell if it's possible ?
Using
jq
:Use
wget
orcurl
or something else that can output JSON data.jq
is filtering the string you want. Note the-r
option to get rid of double quotes.