- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
API call to set informational banner
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2022 11:55 AM
Hi all, I am trying to set the informational banner for my grid using the API, I can get the banner settings but I cannot figure out how to set them. This is the code I use to get the banner
curl -k -u admin -X GET "https://10.10.10.10/wapi/v2.11/grid?_return_fields=informational_banner_setting" which returns:
[
{
"_ref": "grid/b25lLmNsdXN0ZXIkMA:grid",
"informational_banner_setting": {
"color": "RED",
"enable": true,
"message": "My Grid"
}
}
Re: API call to set informational banner
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2022 09:59 AM
Hi,
You can update the setting using the WAPI grid object. Below is a code snippet for reference to set the banner using API.
curl -k -u admin:infoblox -X PUT 'https://grid-master/wapi/v2.11/grid/b25lLmNsdXN0ZXIkMA:Infoblox' -H 'Content-Type: application/json' --data-raw '{ "informational_banner_setting": { "color": "GREEN", "enable": true, "message": "test banner" } }'
Hope this helps.
Shukran
Re: API call to set informational banner
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2022 04:46 AM
Thank you! That worked, except I had to modify it and remove -raw after --data. It sets it in the GUI if I look at Grid Properties but the banner does not change unless I go into the GUI and click Save and Close. Do you know if there is something more I need to do to enable it?
Re: API call to set informational banner
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2022 05:18 AM
The banner settings get updated when you run the API call, you do not need to go to GUI and save the changes.
Try updating the banner using API, then wait a couple minutes and refresh the page. The changes should reflect on the grid.