Rally Software

Expand all | Collapse all

Does Rally support webhooks on Object PortfolioItem/Feature

Jump to Best Answer
  • 1.  Does Rally support webhooks on Object PortfolioItem/Feature

    Posted 09-12-2017 01:42 PM

    Hello! I'm trying create a webhook(to do HTTP Post) for a Rally Feature (ObjectType - PortfolioItem/Feature) when the State is "Done". Doing a curl request in PHP. See the below code snippet 

     

    $webhook = array(
        'AppName' => "Test",
        'AppUrl' => "https://www.test.com",
        'Name' => "Feature Webhook",
        'TargetUrl' => "https://www.sampleserver.com/v_0_0/php/example.php",
        'ObjectTypes' => array("PortfolioItem/Feature"),
        'Expressions' => array(
            array(
                'AttributeName' => "State",
                'Operator' => "=",
                'Value' => "Done"
            ),
            array(
                'AttributeName' => "Workspace",
                'Operator' => "=",
                'Value' => "00******-xxxx-xxxx-xxxx-xxxxxxxxxxx"
            )
        ));
    $postParameters = json_encode($webhook);
    $result = runCurl('https://rally1.rallydev.com/apps/pigeon/api/v2/webhook', $postParameters);

    Webhook works fine for object types HierachicalRequirement and Defect. Can you please let me know what I'm missing with the ObjectType:  PortfolioItem/Feature in the above code.



  • 2.  Re: Does Rally support webhooks on Object PortfolioItem/Feature

    Posted 09-12-2017 05:26 PM

    Hi Rajeshekar,

     

    I think if you change your State filter to use a reference to the portfolioitem State object it will work. If you look at the WSAPI documentation under portfolioitem for the State attribute, you will see the Object Type is State. This is different from Defects where the State attribute is a String. If you query the state object from WSAPI document you can get the list of states. Then use the reference in your query:

     

    ( State = "/state/55948511501" )

     

    Let me know if that helps.

     

    Thanks,

    Sean Davis



  • 3.  Re: Does Rally support webhooks on Object PortfolioItem/Feature

    Posted 09-12-2017 11:59 PM

    Hi Sean,

     

    Thanks for replying. Tried referencing the query to the State object, but the webhook doesn't seem to fire an HTTP post when the feature's state is "Done" (state/56754208490)

    Please see the below snippet

    $webhook = array(
        'AppName' => "Test",
        'AppUrl' => "https://www.test.com",
        'Name' => "Feature Webhook",
        'TargetUrl' => "https://www.sampleserver.com/v_0_0/php/example.php",
        'ObjectTypes' => array("PortfolioItem/Feature"),
        'Expressions' => array(
            array(
                'AttributeName' => "State",
                'Operator' => "=",
                'Value' => "state/56754208490"       
            ),
            array(
                'AttributeName' => "Workspace",
                'Operator' => "=",
                'Value' => "00******-xxxx-xxxx-xxxx-xxxxxxxxxxx"
            )
        ));

    Also, tried removing the State filter from the expressions. Even then, HTTP post is not happening for the object PortfolioItem/Feature. Below is the snippet used without State filter -

    $webhook = array(
        'AppName' => "Test",
        'AppUrl' => "https://www.test.com",
        'Name' => "Feature Webhook",
        'TargetUrl' => "https://www.sampleserver.com/v_0_0/php/example.php",
        'ObjectTypes' => array("PortfolioItem/Feature"),
        'Expressions' => array(
            array(
                'AttributeName' => "Workspace",
                'Operator' => "=",
                'Value' => "00******-xxxx-xxxx-xxxx-xxxxxxxxxxx"
            )
        ));

    Does Rally support webhooks for object type "PortfolioItem/Feature"? If yes, do we have any documentation about the list of objects supported by Rally for webhooks? An example request would be very helpful. Thanks in advance.



  • 4.  Re: Does Rally support webhooks on Object PortfolioItem/Feature
    Best Answer

    Posted 09-13-2017 05:38 PM

    Hi Rajashekar,

    Please update the following line from:

    'ObjectTypes' => array("PortfolioItem/Feature"),

    To
    'ObjectTypes' => array("Feature"),

    Let me know if that helps.

     

    -Sean Davis



  • 5.  Re: Does Rally support webhooks on Object PortfolioItem/Feature

    Posted 09-14-2017 10:34 AM

    Thanks Sean! that worked

    But the read call to fetch details through API required the objectType as PortfolioItem/Feature , where as in webhooks it shud be only Feature!

     

    Do we have the documentation for webhooks, as in the ObjectTypes Name or supported objects list for webhooks?



  • 6.  Re: Does Rally support webhooks on Object PortfolioItem/Feature

    Posted 09-14-2017 06:43 PM

    Hi Rajashekar,

     

    I created this public knowledge article and requested our engineering team update our Webhooks help page with a Portfolio Item example.

     

    -Sean Davis