How to create a Webhook based on a Portfolio Item type using the ObjectTypes attribute?
When creating a Webhook, for any of the Portfolio Item types, the syntax is different than in WS API. Below is an example Webhook that will fire for any change on a PortfolioItem/Feature for one Workspace:
{
"AppName": "SD Webhook Mockbin",
"AppUrl": "http://mockbin.org",
"Name": "SD Webhook Mockbin",
"TargetUrl": "http://mockbin.org/bin/<UUID>",
"ObjectTypes": ["Feature"],
"Expressions":
[
{
"AttributeName": "Workspace",
"Operator": "=",
"Value": "<UUID>"
}
]
}
If you want the Webhook to fire for Initiatives and Features, the ObjectTypes attribute looks like this:
"ObjectTypes": ["Feature","Initiative"],
Below is a link to the Webhook API documentation for other examples.