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

Body ()

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.

Show Source
Back to Top

Response

Supported Media Types

204 Response

Success
Back to Top

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"
}
Back to Top