- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
FMG - How to get System Template Config Interface allowcccess value in string format through API?
Under the System Template > Interface > Config Interface, we can see the allowaccess field populated with string values. (eg., fgfm, ping)
However, in the API response (url: pm/config/adom/{{adom}}/devprof/{{template_name}}/device/template/widget/interface/action-list), we can see total weightage of the selected allow accesses and not the individual access name (for example, allowaccess = 130, if fgfm(128) and ping(2) are selected)
Is there any API to fetch the allowaccess of individual access in string format as shown in UI?
Here is the JSON of the above API output
{
"code": 0,
"data": {
"id": "1",
"result": [
{
"data": [
{
"dynamic_mapping": null,
"oid": 9975,
"var-list": null,
"seq": 1,
"action": "conf-intf",
"model": "all",
"value": {
"allowaccess": 130,
"ip": "$(sys_intf_ip_mask_wan1)",
"name": "port1"
}
},
{
"dynamic_mapping": null,
"oid": 9976,
"var-list": null,
"seq": 2,
"action": "conf-intf",
"model": "all",
"value": {
"allowaccess": 130,
"ip": "$(sys_intf_ip_mask_wan2)",
"name": "port2"
}
},
{
"dynamic_mapping": null,
"oid": 9977,
"var-list": null,
"seq": 3,
"action": "conf-intf",
"model": "all",
"value": {
"allowaccess": 183,
"ip": "$(sys_intf_ip_mask_mgmt)",
"name": "mgmt"
}
},
{
"dynamic_mapping": null,
"oid": 9978,
"var-list": null,
"seq": 4,
"action": "conf-intf",
"model": "all",
"value": {
"allowaccess": 130,
"ip": "$(sys_intf_ip_mask_lan1)",
"name": "port9"
}
}
],
"status": {
"code": 0,
"message": "OK"
},
"url": "pm/config/adom/VCPD/devprof/SYSTL_4INTF_C-C-C-C_Demo/device/template/widget/interface/action-list"
}
]
},
"errors": "",
"message": ""
}
- Labels:
-
FortiManager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I guess you have to convert it to string format with a small script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The value written by the API is total of all the individual access's integer values. if the individual access's integer value is returned by the API, then we can convert that individual integer value to string format.
