Web hooks to Inbound Web Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2017 02:22 PM
Hello World!
In the last week I have turned a lot of hair grey with the following issue.
I have WebHooks sending from TFS, but when it gets to SN it is creating a record in the correct table, with nothing in it. So I need to know what step I am missing here.
From the below I need to be parsing out the information in the "resource" group.
Web hook being sent
Method: POST
URI: https://mindyourownbusiness.service-now.com/u_project_tasks.do?WSDL
HTTP Version: 1.1
Headers:
{
Authorization: Basic ********
Content-Type: application/json; charset=utf-8
}
Content:
{
"subscriptionId": "851e8aab-1e10-473f-986c-f00ac6cf61cf",
"notificationId": 426,
"id": "d2d46fb1-dba5-403c-9373-427583f19e8c",
"eventType": "workitem.created",
"publisherId": "tfs",
"scope": "all",
"message": {
"text": "Bug #5 (Some great new idea!) created by Jamal Hartnett.\r\n(http://fabrikam-fiber-inc.visualstudio.com/web/wi.aspx?pcguid=74e918bf-3376-436d-bd20-8e8c1287f465&i...)"
},
"detailedMessage": {
"text": "Bug #5 (Some great new idea!) created by Jamal Hartnett.\r\n(http://fabrikam-fiber-inc.visualstudio.com/web/wi.aspx?pcguid=74e918bf-3376-436d-bd20-8e8c1287f465&i... Area: FabrikamCloud\r\n- Iteration: FabrikamCloud\\Release 1\\Sprint 1\r\n- State: New\r\n- Assigned to: \r\n- Comment: \r\n- Severity: 3 - Medium\r\n"
},
"resource": {
"id": 5,
"rev": 1,
"fields": {
"System.AreaPath": "FabrikamCloud",
"System.TeamProject": "FabrikamCloud",
"System.IterationPath": "FabrikamCloud\\Release 1\\Sprint 1",
"System.WorkItemType": "Bug",
"System.State": "New",
"System.Reason": "New defect reported",
"System.CreatedDate": "2014-07-15T17:42:44.663Z",
"System.CreatedBy": "Jamal Hartnett",
"System.ChangedDate": "2014-07-15T17:42:44.663Z",
"System.ChangedBy": "Jamal Hartnett",
"System.Title": "Some great new idea!",
"Microsoft.VSTS.Common.Severity": "3 - Medium",
"WEF_EB329F44FE5F4A94ACB1DA153FDF38BA_Kanban.Column": "New"
},
"_links": {
"self": {
"href": "http://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItems/5"
},
"workItemUpdates": {
"href": "http://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItems/5/updates"
},
"workItemRevisions": {
"href": "http://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItems/5/revisions"
},
"workItemType": {
},
"fields": {
"href": "http://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/fields"
}
},
"url": "http://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItems/5"
},
"resourceVersion": "1.0",
"resourceContainers": {
"collection": {
"id": "c12d0eb8-e382-443b-9f9c-c52cba5014c2"
},
"account": {
"id": "f844ec47-a9db-4511-8281-8b63f4eaf94e"
},
"project": {
"id": "be9b3917-87e6-42a4-a549-2bc06a7a878f"
}
},
"createdDate": "2017-06-06T19:42:35.8237914Z"
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2017 07:22 PM
Hi Jonathan,
Have you tried to use the Table API from ServiceNow? It should be very simple to create an integration between TFS and ServiceNow.
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2017 07:24 PM
Here goes some documentation that should be of help:
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 08:27 AM
Thanks for the Reply Berny, but unfortunately the above link follows the same behavior as before. I am just not seeing anything in the record, there is nothing in my logs or anywhere else that I can think.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 08:56 AM
Have you tried setting the X-WantSessionDebugMessages header (you most likely need to set the glide.rest.debug property to true).
V/r,
Gene