Create Application Widget
Create and configure an application widget.
URL: /dashboard-widget-applicationview
Type: POST
Parameter
| Param Type | Name | Description | Field Type |
|---|---|---|---|
| Header | sessionId ** | Session Id received after login | string |
| Query | gwkey | Tenant Key. Needed only in case of multitenant installations | string |
| Query | gwsource** | Source from which the request is triggered (for example, web, external) | String |
| Payload | name** | Name of the widget | String |
| Payload | action.name | Readable name of the action | String |
| Payload | action.type | Type of action. Limited to the actions that are supported in AppviewX | String |
| Payload | vendor | Device vendor | String |
| Payload | hierarchy | Hierarchy to display | String |
| Payload | selectedList.resourceId | Resource id of the object | String |
| Payload | selectedList.actions | Actions on the object | String[] |
** - Mandatory value
The input supports up to three hierarchical levels of groups. group, subGroup1, subGroup2, subGroup3 are static keys.
group
subGroup1
subGroup2
subGroup3
Possible Response Message and Code
| HTTP Code | Description | Response Message |
|---|---|---|
| 200 | OK | Application widget is created under the given dashboard |
| 400 | Bad request |
Sample Request/Response
Use Case
- Create an application widget with a name appwidget and with a group group_1.
- group_1 to have two actions configured – enable and disable.
- group_1 to have two virtual servers – virtualserver_1 and virtualserver_2 configured in it.
- Both the virtual servers to display all the hierarchal children in the group (hierarchy: all)
- Virtualserver_1 and virtualserver_2 to have actions - enable(en) and disable(dis) configured.
- group_1 to have child group group_2 inside it
- group_2 to have two wide IP inside – wideip_1 and wideip_2
- Both the wide IPs to display all the hierarchal children in the group (hierarchy: all)
- wideip_1 and wideip_2 to be configured with actions enable persistence(enPer) and disable persistence(disPer)
- group_2 to be configured with actions enable persistence(enPer) and disable persistence(disPer)
Request URL
http://appviewxapi.com/avxapi//dashboard-widget-applicationview?dashboardName=test&gwkey=f000ca01&gwsource=externalRequest payload
Request
{
"payload": {
"name": "appwidget",
"group": [
{
"name": "main",
"action": [
{
"name": "en",
"type": "Enable"
},
{
"name": "dis",
"type": "Disable"
}
],
"objects": [
{
"vendor": "F5",
"objectType": "VirtualServer",
"hierarchy": "All",
"selectedList": [
{
"resourceId": "virtualserver_1",
"actions": [
"en",
"dis"
]
},
{
"resourceId": "virtualserver_2",
"actions": [
"en",
"dis"
]
}
]
}
],
"subGroup1": [
{
"name": "grp_sub1",
"action": [
{
"name": "enPer",
"type": "EnablePersistence"
},
{
"name": "disPer",
"type": "DisablePersistence"
}
],
"objects": [
{
"vendor": "F5",
"objectType": "wideIp",
"hierarchy": "All",
"selectedList": [
{
"resourceId": "wideip_1",
"actions": [
"enPer",
"disPer"
]
},
{
"resourceId": "wideip_2",
"actions": [
"enPer",
"disPer"
]
}
]
}
]
}
]
}
]
}
}
Response
{
"response": "Application widget is created under the given dashboard.",
"message": "Application widget is created under the given dashboard.",
"appStatusCode": null,
"tags": null,
"headers": null
}