Update Widget Privilege
put
/serviceapi/savedsearchModel/privilege
To share a widget, the user executing the call must have MANAGE privileges or be the OMC admin.
- sharePublic defines if the widget is going to be public
- privilegeType defines if the widget is going to be shared with VIEW or MANAGE privilege
- userName is optional, not defining this will make the widget available to all
Request
This is the object you must send in the body to update a privilege.
Root Schema : UpdateWidgetPrivilege
Type:
object
This is the object you must send in the body to update a privilege.
-
privilegeType:
integer(int32)
The type of privilege you want to update.
0 = VIEW
1 = MANAGE
Example:1
-
searchId:
string(BigInteger)
The widget id.Example:
1234
- sharePublic: integer(int32)
-
userName:
string
The name of the user.Example:
demouser
Response
Supported Media Types
- application/json
204 Response
Success
Examples
Create a new JSON file called update.json and paste the following:
{
"searchId": "5432361245",
"privilegeType": 0,
"sharePublic": 0,
"userName": "demouser"
}
This cURL call will update the privileges of demouser for the widget with searchId: 5432361245:
curl -u ${OMC_USERNAME}:${PASSWORD} -X PUT -H "Content-Type:application/json" "https://{OMC_URL}/serviceapi/savedSearchModel/privilege" -d "@update.json"
Example of Response
The following shows an example of the response body.
{ "searchId": "5432361245", "id": "10", "privilegeType": 0, "sharePublic": 0, "userName": "demouser" }