Webhook - how to determine if a Tag has been used - Webhooks

book

Article ID: 221890

calendar_today

Updated On:

Products

CA Agile Central SaaS (Rally) CA Agile Central On Premise (Rally)

Issue/Introduction

We built the webhook that interacts with the Rally APIs and we are currently making changes to get updates from the items that have the custom tag that we add.  

 

Resolution

Our Webhooks contain a payload of the information in that artifact along with the changes that were made.

At the bottom of the Webhook payload is a section called "changes".  Here is a sample of the payload below where I added the "lorijira" tag and changed the name of the artifact.  My webhook was created to watch for any changes made to User Stories for a particular workspace:

"changes":{"f5b1fb22-6c15-44b5-a592-19189fafe5f2":{"value":54,"old_value":53,"added":null,"removed":null,"type":"Integer","name":"VersionId","display_name":"VersionId","ref":null},"6776da91-9729-42c7-bab1-395b596013f2":{"value":null,"old_value":null,"added":[{"name":"lorijira","ref":"https://rally1.rallydev.com/slm/webservice/v2.x/tag/d1a7978f-58d1-44bb-9c0f-a41b16c035d0","detail_link":null,"id":"d1a7978f-58d1-44bb-9c0f-a41b16c035d0","object_type":"Tag"}],"removed":null,"type":"Collection","name":"Tags","display_name":"Tags","ref":"https://rally1.rallydev.com/slm/webservice/v2.x/HierarchicalRequirement/18403744277/Tags"},"500a0d67-9c48-4145-920c-821033e4a832":{"value":"ICE 66666","old_value":"ICE 55555","added":null,"removed":null,"type":"String","name":"Name","display_name":"Name","ref":null},

Using the above information from the payload should allow you to determine if a specific Tag has been added.

Here is the JSON body for my webhook:

{
    "AppName": "Loribell WebhookInbox Integration 16",
    "AppUrl": "http://api.webhookinbox.com/i/gRvC1TkZ/in/",
    "Name": "Loribell WebhookInbox Integration 16",
    "TargetUrl": "http://api.webhookinbox.com/i/gRvC1TkZ/in/",
    "ObjectTypes": ["HierarchicalRequirement"],
    "Expressions": [{
      "AttributeName": "Workspace",
        "Operator": "=",
      "Value":"fecf5595-8888-4d70-b937-038f88888888"
    }]

}