cancel
Showing results for 
Search instead for 
Did you mean: 

PowerShell script to modify an APPLICATION Custom Property via Rest API/JSON

PowerShell script to modify an APPLICATION Custom Property via Rest API/JSON

I created an application custom property (text) script that allows me to populate it with text of my choosing. The script is basic enough that it can be worked into any existing script.

1.png

I can then use this as an alert variable to populate info into an alert action. The variable in this case is ${N=SwisEntity;M=CustomProperties.CustomAlertNotes}

1.png

The script requires that you pass in the follow alert variables:

  • ${N=SwisEntity;M=Node.NodeID}
  • ${N=SwisEntity;M=ApplicationID}

I also have an example of how to change a NODE custom property via Rest API.

PowerShell script to modify a NODE Custom Property via Rest API/JSON

Attachments
Comments

I think I've looked at this before but the alert custom properties are for the whole definition and not individual active alerts. I have lots of Alert custom properties for sorting and filtering but no use for changing it.

Did I mis-understand?

This is great!

Is there a similar Powershell script (using JSON rest API) to add a node (nodeID) to a group (containerID) ?

Thanks.

There is a sample already provided here that shows how to add members to a group.

That sample adds a definition that uses the "filter" definition.   Instead of using a filter, get the Uri of the node and use that as the definition.

The link (group.ps1) you provided is a sample using powershell AND the Orion SDK... I want to use only JSON rest API (see example in SWIS_Rest_API_Modify_CP_Application.ps1).

Thanks.

Version history
Revision #:
1 of 1
Last update:
‎04-12-2016 11:06 AM
Updated by:
 
Contributors