Reply

API call to set informational banner

Techie
Posts: 12
1544     0

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

Superuser
Posts: 38
1544     0

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

Shukran

Re: API call to set informational banner

Techie
Posts: 12
1544     0

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

Superuser
Posts: 38
1544     0

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.

Shukran
Showing results for 
Search instead for 
Did you mean: 

Recommended for You