Work Item Batch Update
Service : Work Item Tracking
API Version : 4.1
Performs multiple Work Item Update requests. Response contains individual responses for each of the requests in the batch. Failed requests do not affect subsequent requests in the batch.

PATCH : https://{accountName}.visualstudio.com/_apis/wit/$batch?api-version=4.1

URI Parameters

Name In Required Type Description
accountName Path True string The name of the Azure DevOps Services account.
api-version query string Version of the API to use. This should be set to '4.1' to use this version of the api.
bypassRules query boolean Do not enforce the work item type rules on this update.

Request Body
Media Type : "application/json-patch+json"

Name Required Type Description
from string The path to copy from for the Move/Copy operation.
op Operation The patch operation
path string The path for the operation
value object The value for the operation. This is either a primitive or a JToken.

Responses

Name Type Description
200 WorkItem successful operation

Examples

Add a hyperlink
Sample Request

PATCH : https://fabrikam.visualstudio.com/_apis/wit/$batch?api-version=4.1

Request Body

[{
	"method": "PATCH",
	"uri": "/_apis/wit/workitems/10?api-version=4.1",
	"headers": {
		"Content-Type": "application/json-patch+json"
	},
	"body": [{
		"op": "add",
		"path": "/relations/-",
		"value": {
			"rel": "Hyperlink",
			"url": "https://blogs.msdn.com/b/bharry/archive/2014/05/12/a-new-api-for-visual-studio-online.aspx"
		}
		},
		{
			"op": "add",
			"path": "/relations/-",
			"value": {
				"rel": "Hyperlink",
				"url": "https://docs.microsoft.com/en-us/rest/api/vsts/?view=vsts-rest-4.1"
			}
		}
	]
	},
	{
		"method": "PATCH",
		"uri": "/_apis/wit/workitems/12?api-version=4.1",
		"headers": {
			"Content-Type": "application/json-patch+json"
		},
		"body": [{
			"op": "add",
			"path": "/relations/-",
			"value": {
				"rel": "Hyperlink",
				"url": "https://docs.microsoft.com/en-us/rest/api/vsts/?view=vsts-rest-4.1"
			}
			},
			{
				"op": "add",
				"path": "/relations/-",
				"value": {
					"rel": "Hyperlink",
					"url": "https://blogs.msdn.com/b/bharry/archive/2014/05/12/a-new-api-for-visual-studio-online.aspx"
				}
			}
		]
	}
]

Sample Response
Status code : 200

[{
        "id": 10,
        "rev": 6,
        "fields": {
                "System.AreaPath": "Fabrikam-Fiber-Git\\Website",
                "System.TeamProject": "Fabrikam-Fiber-Git",
                "System.IterationPath": "Fabrikam-Fiber-Git",
                "System.WorkItemType": "Task",
                "System.State": "To Do",
                "System.Reason": "New task",
                "System.AssignedTo": "Johnnie McLeod ",
                "System.CreatedDate": "2014-12-29T20:49:21.617Z",
                "System.CreatedBy": "Jamal Hartnett ",
                "System.ChangedDate": "2014-12-29T20:49:27.98Z",
                "System.ChangedBy": "Jamal Hartnett ",
                "System.Title": "JavaScript implementation for Microsoft Account",
                "Microsoft.VSTS.Scheduling.RemainingWork": 4,
                "System.Description": "Follow the code samples from MSDN",
                "System.History": "Linking to a blog article for context"
        },
        "relations": [{
                "rel": "Hyperlink",
                "url": "https://docs.microsoft.com/en-us/rest/api/vsts/?view=vsts-rest-4.1",
                "attributes": {
                        "authorizedDate": "2014-12-29T20:49:27.98Z",
                        "id": 65275,
                        "resourceCreatedDate": "2014-12-29T20:49:27.98Z",
                        "resourceModifiedDate": "2014-12-29T20:49:27.98Z",
                        "revisedDate": "9999-01-01T00:00:00Z"
                }
                },
                {
                        "rel": "Hyperlink",
                        "url": "http://blogs.msdn.com/b/bharry/archive/2014/05/12/a-new-api-for-visual-studio-online.aspx",
                        "attributes": {
                                "authorizedDate": "2014-12-29T20:49:27.98Z",
                                "id": 65275,
                                "resourceCreatedDate": "2014-12-29T20:49:27.98Z",
                                "resourceModifiedDate": "2014-12-29T20:49:27.98Z",
                                "revisedDate": "9999-01-01T00:00:00Z"
                        }
                }
        ],
        "_links": {
                "self": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10"
                },
                "workItemUpdates": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10/updates"
                },
                "workItemRevisions": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10/revisions"
                },
                "workItemHistory": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10/history"
                },
                "html": {
                        "href": "https://fabrikam.visualstudio.com/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=10"
                },
                "workItemType": {
                        "href": "https://fabrikam.visualstudio.com/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Task"
                },
                "fields": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/fields"
                }
        },
        "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10"
}, {
        "id": 12,
        "rev": 6,
        "fields": {
                "System.AreaPath": "Fabrikam-Fiber-Git\\Website",
                "System.TeamProject": "Fabrikam-Fiber-Git",
                "System.IterationPath": "Fabrikam-Fiber-Git",
                "System.WorkItemType": "Task",
                "System.State": "To Do",
                "System.Reason": "New task",
                "System.AssignedTo": "Johnnie McLeod ",
                "System.CreatedDate": "2014-12-29T20:49:21.617Z",
                "System.CreatedBy": "Jamal Hartnett ",
                "System.ChangedDate": "2014-12-29T20:49:27.98Z",
                "System.ChangedBy": "Jamal Hartnett ",
                "System.Title": "JavaScript implementation for Microsoft Account",
                "Microsoft.VSTS.Scheduling.RemainingWork": 4,
                "System.Description": "Follow the code samples from MSDN",
                "System.History": "Linking to a blog article for context"
        },
        "relations": [{
                "rel": "Hyperlink",
                "url": "https://docs.microsoft.com/en-us/rest/api/vsts/?view=vsts-rest-4.1",
                "attributes": {
                        "authorizedDate": "2014-12-29T20:49:27.98Z",
                        "id": 65275,
                        "resourceCreatedDate": "2014-12-29T20:49:27.98Z",
                        "resourceModifiedDate": "2014-12-29T20:49:27.98Z",
                        "revisedDate": "9999-01-01T00:00:00Z"
                }
                },
                {
                        "rel": "Hyperlink",
                        "url": "https://blogs.msdn.com/b/bharry/archive/2014/05/12/a-new-api-for-visual-studio-online.aspx",
                        "attributes": {
                                "authorizedDate": "2014-12-29T20:49:27.98Z",
                                "id": 65275,
                                "resourceCreatedDate": "2014-12-29T20:49:27.98Z",
                                "resourceModifiedDate": "2014-12-29T20:49:27.98Z",
                                "revisedDate": "9999-01-01T00:00:00Z"
                        }
                }
        ],
        "_links": {
                "self": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12"
                },
                "workItemUpdates": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12/updates"
                },
                "workItemRevisions": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12/revisions"
                },
                "workItemHistory": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12/history"
                },
                "html": {
                        "href": "https://fabrikam.visualstudio.com/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=12"
                },
                "workItemType": {
                        "href": "https://fabrikam.visualstudio.com/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Task"
                },
                "fields": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/fields"
                }
        },
        "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12"
}]

Add a Link
Sample Request :

PATCH : https://fabrikam.visualstudio.com/_apis/wit/$batch?api-version=4.1

Request Body :

[{
	"method": "PATCH",
	"uri": "/_apis/wit/workitems/10?api-version=4.1",
	"headers": {
		"Content-Type": "application/json-patch+json"
	},
	"body": [{
		"op": "add",
		"path": "/relations/-",
		"value": {
			"rel": "System.LinkTypes.Dependency-forward",
			"url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/300",
			"attributes": {
				"comment": "Making a new link for the dependency"
			}
		}
	}]
	},
	{
		"method": "PATCH",
		"uri": "/_apis/wit/workitems/12?api-version=4.1",
		"headers": {
			"Content-Type": "application/json-patch+json"
		},
		"body": [{
			"op": "add",
			"path": "/relations/-",
			"value": {
				"rel": "System.LinkTypes.Dependency-forward",
				"url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/303",
				"attributes": {
					"comment": "Making a new link for the dependency."
				}
			}
		}]
	}
]

Sample Response :
Status Code : 200

[{
	"id": 10,
	"rev": 3,
	"fields": {
		"System.AreaPath": "Fabrikam-Fiber-Git\\Website",
		"System.TeamProject": "Fabrikam-Fiber-Git",
		"System.IterationPath": "Fabrikam-Fiber-Git",
		"System.WorkItemType": "Task",
		"System.State": "To Do",
		"System.Reason": "New task",
		"System.AssignedTo": "Johnnie McLeod ",
		"System.CreatedDate": "2014-12-29T20:49:21.617Z",
		"System.CreatedBy": "Jamal Hartnett ",
		"System.ChangedDate": "2014-12-29T20:49:24.67Z",
		"System.ChangedBy": "Jamal Hartnett ",
		"System.Title": "JavaScript implementation for Microsoft Account",
		"Microsoft.VSTS.Scheduling.RemainingWork": 4,
		"System.Description": "Follow the code samples from MSDN",
		"System.History": "Johnnie is going to take this work over."
	},
	"relations": [{
		"rel": "System.LinkTypes.Dependency-Forward",
		"url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/300",
		"attributes": {
			"isLocked": false,
			"comment": "Making a new link for the dependency"
		}
	}],
	"_links": {
		"self": {
			"href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10"
		},
		"workItemUpdates": {
			"href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10/updates"
		},
		"workItemRevisions": {
			"href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10/revisions"
		},
		"workItemHistory": {
			"href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10/history"
		},
		"html": {
			"href": "https://fabrikam.visualstudio.com/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=10"
		},
		"workItemType": {
			"href": "https://fabrikam.visualstudio.com/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Task"
		},
		"fields": {
			"href": "https://fabrikam.visualstudio.com/_apis/wit/fields"
		}
	},
	"url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10"
	},
	{
		"id": 12,
		"rev": 3,
		"fields": {
			"System.AreaPath": "Fabrikam-Fiber-Git\\Website",
			"System.TeamProject": "Fabrikam-Fiber-Git",
			"System.IterationPath": "Fabrikam-Fiber-Git",
			"System.WorkItemType": "Task",
			"System.State": "To Do",
			"System.Reason": "New task",
			"System.AssignedTo": "Johnnie McLeod ",
			"System.CreatedDate": "2014-12-29T20:49:21.617Z",
			"System.CreatedBy": "Jamal Hartnett ",
			"System.ChangedDate": "2014-12-29T20:49:24.67Z",
			"System.ChangedBy": "Jamal Hartnett ",
			"System.Title": "JavaScript implementation for Microsoft Account",
			"Microsoft.VSTS.Scheduling.RemainingWork": 4,
			"System.Description": "Follow the code samples from MSDN",
			"System.History": "Johnnie is going to take this work over."
		},
		"relations": [{
			"rel": "System.LinkTypes.Dependency-Forward",
			"url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/303",
			"attributes": {
				"isLocked": false,
				"comment": "Making a new link for the dependency"
			}
		}],
		"_links": {
			"self": {
				"href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12"
			},
			"workItemUpdates": {
				"href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12/updates"
			},
			"workItemRevisions": {
				"href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12/revisions"
			},
			"workItemHistory": {
				"href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12/history"
			},
			"html": {
				"href": "https://fabrikam.visualstudio.com/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=12"
			},
			"workItemType": {
				"href": "https://fabrikam.visualstudio.com/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Task"
			},
			"fields": {
				"href": "https://fabrikam.visualstudio.com/_apis/wit/fields"
			}
		},
		"url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12"
	}
]

Add a tag
Sample Request :

PATCH : https://fabrikam.visualstudio.com/_apis/wit/$batch?api-version=4.1

Request Body :

[{
	"method": "PATCH",
	"uri": "/_apis/wit/workitems/10?api-version=4.1",
	"headers": {
		"Content-Type": "application/json-patch+json"
	},
	"body": [{
		"op": "add",
		"path": "/fields/System.Tags",
		"value": "Tag1; Tag2"
	}]
	},
	{
		"method": "PATCH",
		"uri": "/_apis/wit/workitems/12?api-version=4.1",
		"headers": {
			"Content-Type": "application/json-patch+json"
		},
		"body": [{

	"op": "add",
	"path": "/fields/System.Tags",
	"value": "Tag1; Tag2"
	}]
	}
]

Sample Response
Status Code : 200

[{
        "id": 10,
        "rev": 3,
        "fields": {
                "System.AreaPath": "Fabrikam-Fiber-Git\\Website",
                "System.TeamProject": "Fabrikam-Fiber-Git",
                "System.IterationPath": "Fabrikam-Fiber-Git",
                "System.WorkItemType": "Task",
                "System.State": "To Do",
                "System.Reason": "New task",
                "System.AssignedTo": "Johnnie McLeod ",
                "System.CreatedDate": "2014-12-29T20:49:21.617Z",
                "System.CreatedBy": "Jamal Hartnett ",
                "System.ChangedDate": "2014-12-29T20:49:24.67Z",
                "System.ChangedBy": "Jamal Hartnett ",
                "System.Title": "JavaScript implementation for Microsoft Account",
                "Microsoft.VSTS.Scheduling.RemainingWork": 4,
                "System.Description": "Follow the code samples from MSDN",
                "System.History": "Johnnie is going to take this work over.",
                "System.Tags": "Tag1; Tag2"
        },
        "relations": [{
                "rel": "System.LinkTypes.Dependency-Forward",
                "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/300",
                "attributes": {
                        "isLocked": false,
                        "comment": "Making a new link for the dependency"
                }
        }],
        "_links": {
                "self": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10"
                },
                "workItemUpdates": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10/updates"
                },
                "workItemRevisions": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10/revisions"
                },
                "workItemHistory": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10/history"
                },
                "html": {
                        "href": "https://fabrikam.visualstudio.com/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=10"
                },
                "workItemType": {
                        "href": "https://fabrikam.visualstudio.com/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Task"
                },
                "fields": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/fields"
                }
        },
        "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10"
        },
        {
                "id": 12,
                "rev": 3,
                "fields": {
                        "System.AreaPath": "Fabrikam-Fiber-Git\\Website",
                        "System.TeamProject": "Fabrikam-Fiber-Git",
                        "System.IterationPath": "Fabrikam-Fiber-Git",
                        "System.WorkItemType": "Task",
                        "System.State": "To Do",
                        "System.Reason": "New task",
                        "System.AssignedTo": "Johnnie McLeod ",
                        "System.CreatedDate": "2014-12-29T20:49:21.617Z",
                        "System.CreatedBy": "Jamal Hartnett ",
                        "System.ChangedDate": "2014-12-29T20:49:24.67Z",
                        "System.ChangedBy": "Jamal Hartnett ",
                        "System.Title": "JavaScript implementation for Microsoft Account",
                        "Microsoft.VSTS.Scheduling.RemainingWork": 4,
                        "System.Description": "Follow the code samples from MSDN",
                        "System.History": "Johnnie is going to take this work over.",
                        "System.Tags": "Tag1; Tag2"
                },
                "relations": [{
                        "rel": "System.LinkTypes.Dependency-Forward",
                        "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/303",
                        "attributes": {
                                "isLocked": false,
                                "comment": "Making a new link for the dependency"
                        }
                }],
                "_links": {
                        "self": {
                                "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12"
                        },
                        "workItemUpdates": {
                                "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12/updates"
                        },
                        "workItemRevisions": {
                                "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12/revisions"
                        },
                        "workItemHistory": {
                                "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12/history"
                        },
                        "html": {
                                "href": "https://fabrikam.visualstudio.com/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=12"
                        },
                        "workItemType": {
                                "href": "https://fabrikam.visualstudio.com/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Task"
                        },
                        "fields": {
                                "href": "https://fabrikam.visualstudio.com/_apis/wit/fields"
                        }
                },
                "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12"
        }
]

Add an attachment
Sample Request :

PATCH :   https://fabrikam.visualstudio.com/_apis/wit/$batch?api-version=4.1

Request Body :

[{
	"method": "PATCH",
	"uri": "/_apis/wit/workitems/10?api-version=4.1",
	"headers": {
		"Content-Type": "application/json-patch+json"
	},
	"body": [{
		"op": "add",
		"path": "/relations/-",
		"value": {
			"rel": "AttachedFile",
			"url": "https://fabrikam.visualstudio.com/_apis/wit/attachments/098a279a-60b9-40a8-868b-b7fd00c0a439?fileName=Spec.txt",
			"attributes": {
				"comment": "Spec for the work"
			}
		}
	}]
	},
	{
		"method": "PATCH",
		"uri": "/_apis/wit/workitems/12?api-version=4.1",
		"headers": {
			"Content-Type": "application/json-patch+json"
		},
		"body": [{
			"op": "add",
			"path": "/relations/-",
			"value": {
				"rel": "AttachedFile",
				"url": "https://fabrikam.visualstudio.com/_apis/wit/attachments/098a279a-60b9-40a8-868b-b7fd00c0a439?fileName=Spec.txt",
				"attributes": {
					"comment": "Spec for the work"
				}
			}
		}]
	}
]

Sample Response
Status code : 200

[{
        "id": 10,
        "rev": 3,
        "fields": {
                "System.AreaPath": "Fabrikam-Fiber-Git\\Website",
                "System.TeamProject": "Fabrikam-Fiber-Git",
                "System.IterationPath": "Fabrikam-Fiber-Git",
                "System.WorkItemType": "Task",
                "System.State": "To Do",
                "System.Reason": "New task",
                "System.AssignedTo": "Johnnie McLeod ",
                "System.CreatedDate": "2014-12-29T20:49:21.617Z",
                "System.CreatedBy": "Jamal Hartnett ",
                "System.ChangedDate": "2014-12-29T20:49:24.67Z",
                "System.ChangedBy": "Jamal Hartnett ",
                "System.Title": "JavaScript implementation for Microsoft Account",
                "Microsoft.VSTS.Scheduling.RemainingWork": 4,
                "System.Description": "Follow the code samples from MSDN",
                "System.History": "Johnnie is going to take this work over.",
                "System.Tags": "Tag1; Tag2"
        },
        "relations": [{
                "rel": "AttachedFile",
                "url": "https://fabrikam.visualstudio.com/_apis/wit/attachments/098a279a-60b9-40a8-868b-b7fd00c0a439",
                "attributes": {
                        "authorizedDate": "2014-12-29T20:49:26.99Z",
                        "id": 65274,
                        "resourceCreatedDate": "2014-12-29T20:49:26.99Z",
                        "resourceModifiedDate": "2014-12-29T20:49:26.99Z",
                        "revisedDate": "9999-01-01T00:00:00Z",
                        "comment": "Spec for the work",
                        "name": "Spec.txt"
                }
        }],
        "_links": {
                "self": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10"
                },
                "workItemUpdates": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10/updates"
                },
                "workItemRevisions": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10/revisions"
                },
                "workItemHistory": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10/history"
                },
                "html": {
                        "href": "https://fabrikam.visualstudio.com/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=10"
                },
                "workItemType": {
                        "href": "https://fabrikam.visualstudio.com/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Task"
                },
                "fields": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/fields"
                }
        },
        "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10"
        },
        {
                "id": 12,
                "rev": 3,
                "fields": {
                        "System.AreaPath": "Fabrikam-Fiber-Git\\Website",
                        "System.TeamProject": "Fabrikam-Fiber-Git",
                        "System.IterationPath": "Fabrikam-Fiber-Git",
                        "System.WorkItemType": "Task",
                        "System.State": "To Do",
                        "System.Reason": "New task",
                        "System.AssignedTo": "Johnnie McLeod ",
                        "System.CreatedDate": "2014-12-29T20:49:21.617Z",
                        "System.CreatedBy": "Jamal Hartnett ",
                        "System.ChangedDate": "2014-12-29T20:49:24.67Z",
                        "System.ChangedBy": "Jamal Hartnett ",
                        "System.Title": "JavaScript implementation for Microsoft Account",
                        "Microsoft.VSTS.Scheduling.RemainingWork": 4,
                        "System.Description": "Follow the code samples from MSDN",
                        "System.History": "Johnnie is going to take this work over.",
                        "System.Tags": "Tag1; Tag2"
                },
                "relations": [{
                        "rel": "AttachedFile",
                        "url": "https://fabrikam.visualstudio.com/_apis/wit/attachments/098a279a-60b9-40a8-868b-b7fd00c0a439",
                        "attributes": {
                                "authorizedDate": "2014-12-29T20:49:26.99Z",
                                "id": 65274,
                                "resourceCreatedDate": "2014-12-29T20:49:26.99Z",
                                "resourceModifiedDate": "2014-12-29T20:49:26.99Z",
                                "revisedDate": "9999-01-01T00:00:00Z",
                                "comment": "Spec for the work",
                                "name": "Spec.txt"
                        }
                }],
                "_links": {
                        "self": {
                                "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12"
                        },
                        "workItemUpdates": {
                                "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12/updates"
                        },
                        "workItemRevisions": {
                                "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12/revisions"
                        },
                        "workItemHistory": {
                                "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12/history"
                        },
                        "html": {
                                "href": "https://fabrikam.visualstudio.com/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=12"
                        },
                        "workItemType": {
                                "href": "https://fabrikam.visualstudio.com/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Task"
                        },
                        "fields": {
                                "href": "https://fabrikam.visualstudio.com/_apis/wit/fields"
                        }
                },
                "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12"
        }
]

Change work item type (API Availability: Team Services only (not TFS))
Sample Request

PATCH :   https://fabrikam.visualstudio.com/_apis/wit/$batch?api-version=4.1

Request Body :

[{
        "method": "PATCH",
        "uri": "/_apis/wit/workitems/10?api-version=4.1",
        "headers": {
                "Content-Type": "application/json-patch+json"
        },
        "body": [{
                "op": "add",
                "path": "/fields/System.WorkItemType",
                "value": "Task"
        }]
        },
        {
                "method": "PATCH",
                "uri": "/_apis/wit/workitems/12?api-version=4.1",
                "headers": {
                        "Content-Type": "application/json-patch+json"
                },
                "body": [{
                        "op": "add",
                        "path": "/fields/System.WorkItemType",
                        "value": "Task"
                }]
        }
]

Sample Response :
Status Code : 200

[{
        "id": 10,
        "rev": 3,
        "fields": {
                "System.AreaPath": "Fabrikam-Fiber-Git\\Website",
                "System.TeamProject": "Fabrikam-Fiber-Git",
                "System.IterationPath": "Fabrikam-Fiber-Git",
                "System.WorkItemType": "Task",
                "System.State": "To Do",
                "System.Reason": "New task",
                "System.AssignedTo": "Johnnie McLeod ",
                "System.CreatedDate": "2014-12-29T20:49:21.617Z",
                "System.CreatedBy": "Jamal Hartnett ",
                "System.ChangedDate": "2014-12-29T20:49:24.67Z",
                "System.ChangedBy": "Jamal Hartnett ",
                "System.Title": "JavaScript implementation for Microsoft Account",
                "Microsoft.VSTS.Scheduling.RemainingWork": 4,
                "System.Description": "Follow the code samples from MSDN",
                "System.History": "Johnnie is going to take this work over.",
                "System.Tags": "Tag1; Tag2"
        },
        "relations": [{
      "rel": "AttachedFile",
      "url": "https://fabrikam.visualstudio.com/_apis/wit/attachments/098a279a-60b9-40a8-868b-b7fd00c0a439",
      "attributes": {
        "authorizedDate": "2014-12-29T20:49:26.99Z",
        "id": 65274,
        "resourceCreatedDate": "2014-12-29T20:49:26.99Z",
        "resourceModifiedDate": "2014-12-29T20:49:26.99Z",
        "revisedDate": "9999-01-01T00:00:00Z",
        "comment": "Spec for the work",
        "name": "Spec.txt"
      }
    }],
        "_links": {
                "self": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10"
                },
                "workItemUpdates": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10/updates"
                },
                "workItemRevisions": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10/revisions"
                },
                "workItemHistory": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10/history"
                },
                "html": {
                        "href": "https://fabrikam.visualstudio.com/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=10"
                },
                "workItemType": {
                        "href": "https://fabrikam.visualstudio.com/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Task"
                },
                "fields": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/fields"
                }
        },
        "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10"
        },
        {
                "id": 12,
                "rev": 3,
                "fields": {
                        "System.AreaPath": "Fabrikam-Fiber-Git\\Website",
                        "System.TeamProject": "Fabrikam-Fiber-Git",
                        "System.IterationPath": "Fabrikam-Fiber-Git",
                        "System.WorkItemType": "Task",
                        "System.State": "To Do",
                        "System.Reason": "New task",
                        "System.AssignedTo": "Johnnie McLeod ",
                        "System.CreatedDate": "2014-12-29T20:49:21.617Z",
                        "System.CreatedBy": "Jamal Hartnett ",
                        "System.ChangedDate": "2014-12-29T20:49:24.67Z",
                        "System.ChangedBy": "Jamal Hartnett ",
                        "System.Title": "JavaScript implementation for Microsoft Account",
                        "Microsoft.VSTS.Scheduling.RemainingWork": 4,
                        "System.Description": "Follow the code samples from MSDN",
                        "System.History": "Johnnie is going to take this work over.",
                        "System.Tags": "Tag1; Tag2"
                },
                "relations": [{
      "rel": "AttachedFile",
      "url": "https://fabrikam.visualstudio.com/_apis/wit/attachments/098a279a-60b9-40a8-868b-b7fd00c0a439",
      "attributes": {
        "authorizedDate": "2014-12-29T20:49:26.99Z",
        "id": 65274,
        "resourceCreatedDate": "2014-12-29T20:49:26.99Z",
        "resourceModifiedDate": "2014-12-29T20:49:26.99Z",
        "revisedDate": "9999-01-01T00:00:00Z",
        "comment": "Spec for the work",
        "name": "Spec.txt"
      }
    }],
        "_links": {
                "self": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12"
                },
                "workItemUpdates": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12/updates"
                },
                "workItemRevisions": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12/revisions"
                },
                "workItemHistory": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12/history"
                },
                "html": {
                        "href": "https://fabrikam.visualstudio.com/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=12"
                },
                "workItemType": {
                        "href": "https://fabrikam.visualstudio.com/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Task"
                },
                "fields": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/fields"
                }
        },
        "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12"
        }
]

Make an update bypassrule :
Sample Request :

PATCH :   https://fabrikam.visualstudio.com/_apis/wit/$batch?api-version=4.1

Request Body :

[{
	"method": "PATCH",
	"uri": "/_apis/wit/workitems/10?bypassRules=true&api-version=4.1",
	"headers": {
		"Content-Type": "application/json-patch+json"
	},
	"body": [{
		"op": "add",
		"path": "/fields/System.AssignedTo",
		"value": "Invalid Value"
	}]
	},
	{
		"method": "PATCH",
		"uri": "/_apis/wit/workitems/12?bypassRules=true&api-version=4.1",
		"headers": {
			"Content-Type": "application/json-patch+json"
		},
		"body": [{
			"op": "add",
			"path": "/fields/System.AssignedTo",
			"value": "Invalid Value"
		}]
	}
]

Sample Response
Status Code : 200

[{
        "id": 10,
        "rev": 3,
        "fields": {
                "System.AreaPath": "Fabrikam-Fiber-Git\\Website",
                "System.TeamProject": "Fabrikam-Fiber-Git",
                "System.IterationPath": "Fabrikam-Fiber-Git",
                "System.WorkItemType": "Task",
                "System.State": "To Do",
                "System.Reason": "New task",
                "System.AssignedTo": "Invalid Value",
                "System.CreatedDate": "2014-12-29T20:49:21.617Z",
                "System.CreatedBy": "Jamal Hartnett ",
                "System.ChangedDate": "2014-12-29T20:49:24.67Z",
                "System.ChangedBy": "Jamal Hartnett ",
                "System.Title": "JavaScript implementation for Microsoft Account",
                "Microsoft.VSTS.Scheduling.RemainingWork": 4,
                "System.Description": "Follow the code samples from MSDN",
                "System.History": "Johnnie is going to take this work over.",
                "System.Tags": "Tag1; Tag2"
        },
        "relations": [{
      "rel": "AttachedFile",
      "url": "https://fabrikam.visualstudio.com/_apis/wit/attachments/098a279a-60b9-40a8-868b-b7fd00c0a439",
      "attributes": {
        "authorizedDate": "2014-12-29T20:49:26.99Z",
        "id": 65274,
        "resourceCreatedDate": "2014-12-29T20:49:26.99Z",
        "resourceModifiedDate": "2014-12-29T20:49:26.99Z",
        "revisedDate": "9999-01-01T00:00:00Z",
        "comment": "Spec for the work",
        "name": "Spec.txt"
      }
    }],
        "_links": {
                "self": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10"
                },
                "workItemUpdates": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10/updates"
                },
                "workItemRevisions": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10/revisions"
                },
                "workItemHistory": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10/history"
                },
                "html": {
                        "href": "https://fabrikam.visualstudio.com/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=10"
                },
                "workItemType": {
                        "href": "https://fabrikam.visualstudio.com/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Task"
                },
                "fields": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/fields"
                }
        },
        "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/10"
        },
        {
                "id": 12,
                "rev": 3,
                "fields": {
                        "System.AreaPath": "Fabrikam-Fiber-Git\\Website",
                        "System.TeamProject": "Fabrikam-Fiber-Git",
                        "System.IterationPath": "Fabrikam-Fiber-Git",
                        "System.WorkItemType": "Task",
                        "System.State": "To Do",
                        "System.Reason": "New task",
                        "System.AssignedTo": "Invalid Value",
                        "System.CreatedDate": "2014-12-29T20:49:21.617Z",
                        "System.CreatedBy": "Jamal Hartnett ",
                        "System.ChangedDate": "2014-12-29T20:49:24.67Z",
                        "System.ChangedBy": "Jamal Hartnett ",
                        "System.Title": "JavaScript implementation for Microsoft Account",
                        "Microsoft.VSTS.Scheduling.RemainingWork": 4,
                        "System.Description": "Follow the code samples from MSDN",
                        "System.History": "Johnnie is going to take this work over.",
                        "System.Tags": "Tag1; Tag2"
                },
                "relations": [{
      "rel": "AttachedFile",
      "url": "https://fabrikam.visualstudio.com/_apis/wit/attachments/098a279a-60b9-40a8-868b-b7fd00c0a439",
      "attributes": {
        "authorizedDate": "2014-12-29T20:49:26.99Z",
        "id": 65274,
        "resourceCreatedDate": "2014-12-29T20:49:26.99Z",
        "resourceModifiedDate": "2014-12-29T20:49:26.99Z",
        "revisedDate": "9999-01-01T00:00:00Z",
        "comment": "Spec for the work",
        "name": "Spec.txt"
      }
    }],
        "_links": {
                "self": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12"
                },
                "workItemUpdates": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12/updates"
                },
                "workItemRevisions": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12/revisions"
                },
                "workItemHistory": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12/history"
                },
                "html": {
                        "href": "https://fabrikam.visualstudio.com/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=12"
                },
                "workItemType": {
                        "href": "https://fabrikam.visualstudio.com/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Task"
                },
                "fields": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/fields"
                }
        },
        "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/12"
        }
]

Move work items (API Availability: Team Services only (not TFS))
Sample Request :

PATCH :   https://fabrikam.visualstudio.com/_apis/wit/$batch?api-version=4.1

Request Body :

[{
        "method": "PATCH",
        "uri": "/_apis/wit/workitems/10?api-version=4.1",
        "headers": {
                "Content-Type": "application/json-patch+json"
        },
        "body": [{
                "op": "add",
                "path": "/fields/System.TeamProject",
                "value": "Fabrikam-Scrum"
                },
                {
                        "op": "add",
                        "path": "/fields/System.AreaPath",
                        "value": "Fabrikam-Scrum"
                },
                {
                        "op": "add",
                        "path": "/fields/System.IterationPath",
                        "value": "Fabrikam-Scrum"
                }
        ]
        }

]

Sample Response :
Status Code : 200

[{
        "id": 398,
        "rev": 2,
        "fields": {
                "System.AreaPath": "Fabrikam-Scrum",
                "System.TeamProject": "Fabrikam-Scrum",
                "System.IterationPath": "Fabrikam-Scrum",
                "System.WorkItemType": "Bug",
                "System.State": "New",
                "System.Reason": "New defect reported",
                "System.CreatedDate": "2016-04-07T16:42:06.55Z",
                "System.CreatedBy": "Chuck Reinhart ",
                "System.ChangedDate": "2016-04-07T16:42:07.737Z",
                "System.ChangedBy": "Chuck Reinhart ",
                "System.Title": "First bug",
                "System.BoardColumn": "New",
                "System.BoardColumnDone": false,
                "Microsoft.VSTS.Common.StateChangeDate": "2016-04-07T16:42:06.55Z",
                "Microsoft.VSTS.Common.Priority": 2,
                "Microsoft.VSTS.Common.Severity": "3 - Medium",
                "WEF_F9DCD9224F6E466499435017DB7D2D07_Kanban.Column": "New",
                "WEF_F9DCD9224F6E466499435017DB7D2D07_Kanban.Column.Done": false,
                "Microsoft.VSTS.Common.ValueArea": "Business",
                "WEF_F571AABFDCE945628B5E816FF5294898_Kanban.Column": "New",
                "WEF_F571AABFDCE945628B5E816FF5294898_Kanban.Column.Done": false
        },
        "_links": {
                "self": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/398"
                },
                "workItemUpdates": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/398/updates"
                },
                "workItemRevisions": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/398/revisions"
                },
                "workItemHistory": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/398/history"
                },
                "html": {
                        "href": "https://fabrikam.visualstudio.com/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=398"
                },
                "workItemType": {
                        "href": "https://fabrikam.visualstudio.com/b5c43ab0-20bb-44df-9690-7d3ea77c31cc/_apis/wit/workItemTypes/Bug"
                },
                "fields": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/fields"
                }
        },
        "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/398"
}]

Remove link
Sample Request :

PATCH :   https://fabrikam.visualstudio.com/_apis/wit/$batch?api-version=4.1

Request Body :

[{
	"method": "PATCH",
	"uri": "/_apis/wit/workitems/299?api-version=4.1",
	"headers": {
		"Content-Type": "application/json-patch+json"
	},
	"body": [{
		"op": "remove",
		"path": "/relations/2"
	}]
}]

Sample Response
Status Code : 200

[{
	"id": 299,
	"rev": 3,
	"fields": {
		"System.AreaPath": "Fabrikam-Fiber-Git\\Website",
		"System.TeamProject": "Fabrikam-Fiber-Git",
		"System.IterationPath": "Fabrikam-Fiber-Git",
		"System.WorkItemType": "Task",
		"System.State": "To Do",
		"System.Reason": "New task",
		"System.AssignedTo": "Johnnie McLeod ",
		"System.CreatedDate": "2014-12-29T20:49:21.617Z",
		"System.CreatedBy": "Jamal Hartnett ",
		"System.ChangedDate": "2014-12-29T20:49:24.67Z",
		"System.ChangedBy": "Jamal Hartnett ",
		"System.Title": "JavaScript implementation for Microsoft Account",
		"Microsoft.VSTS.Scheduling.RemainingWork": 4,
		"System.Description": "Follow the code samples from MSDN",
		"System.History": "Johnnie is going to take this work over."
	},
	"relations": [{
		"rel": "System.LinkTypes.Hierarchy-Reverse",
		"url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/297",
		"attributes": {
			"isLocked": false,
			"comment": "decomposition of work"
		}
		},
		{
			"rel": "System.LinkTypes.Related",
			"url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/300",
			"attributes": {
				"isLocked": false,
				"comment": "adding another task"
			}
		}
	],
	"_links": {
		"self": {
			"href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299"
		},
		"workItemUpdates": {
			"href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299/updates"
		},
		"workItemRevisions": {
			"href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299/revisions"
		},
		"workItemHistory": {
			"href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299/history"
		},
		"html": {
			"href": "https://fabrikam.visualstudio.com/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=299"
		},
		"workItemType": {
			"href": "https://fabrikam.visualstudio.com/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Task"
		},
		"fields": {
			"href": "https://fabrikam.visualstudio.com/_apis/wit/fields"
		}
	},
	"url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299"
}]

Remove an attachment
Sample Request :

PATCH :   https://fabrikam.visualstudio.com/_apis/wit/$batch?api-version=4.1

Request Body :

[{
	"method": "PATCH",
	"uri": "/_apis/wit/workitems/299?api-version=4.1",
	"headers": {
		"Content-Type": "application/json-patch+json"
	},
	"body": [{
		"op": "remove",
		"path": "/relations/2"
	}]
}]

Sample Response
Status Code : 200

[{
        "id": 299,
        "rev": 3,
        "fields": {
                "System.AreaPath": "Fabrikam-Fiber-Git\\Website",
                "System.TeamProject": "Fabrikam-Fiber-Git",
                "System.IterationPath": "Fabrikam-Fiber-Git",
                "System.WorkItemType": "Task",
                "System.State": "To Do",
                "System.Reason": "New task",
                "System.AssignedTo": "Johnnie McLeod ",
                "System.CreatedDate": "2014-12-29T20:49:21.617Z",
                "System.CreatedBy": "Jamal Hartnett ",
                "System.ChangedDate": "2014-12-29T20:49:24.67Z",
                "System.ChangedBy": "Jamal Hartnett ",
                "System.Title": "JavaScript implementation for Microsoft Account",
                "Microsoft.VSTS.Scheduling.RemainingWork": 4,
                "System.Description": "Follow the code samples from MSDN",
                "System.History": "Johnnie is going to take this work over."
        },
        "relations": [{
                "rel": "System.LinkTypes.Hierarchy-Reverse",
                "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/297",
                "attributes": {
                        "isLocked": false,
                        "comment": "decomposition of work"
                }
                },
                {
                        "rel": "System.LinkTypes.Related",
                        "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/300",
                        "attributes": {
                                "isLocked": false,
                                "comment": "adding another task"
                        }
                }
        ],
        "_links": {
                "self": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299"
                },
                "workItemUpdates": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299/updates"
                },
                "workItemRevisions": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299/revisions"
                },
                "workItemHistory": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299/history"
                },
                "html": {
                        "href": "https://fabrikam.visualstudio.com/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=299"
                },
                "workItemType": {
                        "href": "https://fabrikam.visualstudio.com/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Task"
                },
                "fields": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/fields"
                }
        },
        "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299"
}]

Update a field
Sample Request :

PATCH :   https://fabrikam.visualstudio.com/_apis/wit/$batch?api-version=4.1

Request Body :

[{
	"method": "PATCH",
	"uri": "/_apis/wit/workitems/10?api-version=4.1",
	"headers": {
		"Content-Type": "application/json-patch+json"
	},
	"body": [{
		"op": "test",
		"path": "/rev",
		"value": 1
		},
		{
			"op": "add",
			"path": "/fields/System.AreaPath",
			"value": "Fabrikam-Fiber-Git\\Website"
		},
		{
			"op": "add",
			"path": "/fields/System.History",
			"value": "Moving to the right area path"
		}
	]
}]

Sample Response :
Status Code : 200

[{
	"id": 299,
	"rev": 2,
	"fields": {
		"System.AreaPath": "Fabrikam-Fiber-Git\\Website",
		"System.TeamProject": "Fabrikam-Fiber-Git",
		"System.IterationPath": "Fabrikam-Fiber-Git",
		"System.WorkItemType": "Task",
		"System.State": "To Do",
		"System.Reason": "New task",
		"System.CreatedDate": "2014-12-29T20:49:21.617Z",
		"System.CreatedBy": "Jamal Hartnett ",
		"System.ChangedDate": "2014-12-29T20:49:23.933Z",
		"System.ChangedBy": "Jamal Hartnett ",
		"System.Title": "JavaScript implementation for Microsoft Account",
		"Microsoft.VSTS.Scheduling.RemainingWork": 4,
		"System.Description": "Follow the code samples from MSDN",
		"System.History": "Moving to the right area path"
	},
	"relations": [{
		"rel": "System.LinkTypes.Hierarchy-Reverse",
		"url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/297",
		"attributes": {
			"isLocked": false,
			"comment": "decomposition of work"
		}
	}],
	"_links": {
		"self": {
			"href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299"
		},
		"workItemUpdates": {
			"href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299/updates"
		},
		"workItemRevisions": {
			"href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299/revisions"
		},
		"workItemHistory": {
			"href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299/history"
		},
		"html": {
			"href": "https://fabrikam.visualstudio.com/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=299"
		},
		"workItemType": {
			"href": "https://fabrikam.visualstudio.com/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Task"
		},
		"fields": {
			"href": "https://fabrikam.visualstudio.com/_apis/wit/fields"
		}
	},
	"url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299"
}]

Update a Link
Sample Request :

PATCH :   https://fabrikam.visualstudio.com/_apis/wit/$batch?api-version=4.1

Request Body :

[{
  "method": "PATCH",
  "uri": "/_apis/wit/workitems/299?api-version=4.1",
  "headers": {
    "Content-Type": "application/json-patch+json"
  },
  "body": [
  {
    "op": "test",
    "path": "/rev",
    "value": 3
  },
  {
    "op": "replace",
    "path": "/relations/2/attributes/comment",
    "value": "Adding traceability to dependencies"
  }
]
  }
]

Sample Response :
Status Code : 200

[{
        "id": 299,
        "rev": 3,
        "fields": {
                "System.AreaPath": "Fabrikam-Fiber-Git\\Website",
                "System.TeamProject": "Fabrikam-Fiber-Git",
                "System.IterationPath": "Fabrikam-Fiber-Git",
                "System.WorkItemType": "Task",
                "System.State": "To Do",
                "System.Reason": "New task",
                "System.AssignedTo": "Johnnie McLeod ",
                "System.CreatedDate": "2014-12-29T20:49:21.617Z",
                "System.CreatedBy": "Jamal Hartnett ",
                "System.ChangedDate": "2014-12-29T20:49:24.67Z",
                "System.ChangedBy": "Jamal Hartnett ",
                "System.Title": "JavaScript implementation for Microsoft Account",
                "Microsoft.VSTS.Scheduling.RemainingWork": 4,
                "System.Description": "Follow the code samples from MSDN",
                "System.History": "Johnnie is going to take this work over."
        },
        "relations": [{
                "rel": "System.LinkTypes.Hierarchy-Reverse",
                "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/297",
                "attributes": {
                        "isLocked": false,
                        "comment": "decomposition of work"
                }
                },
                {
                        "rel": "System.LinkTypes.Related",
                        "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/300",
                        "attributes": {
                                "isLocked": false,
                                "comment": "adding another task"
                        }
                },
                {
                        "rel": "System.LinkTypes.Dependency-Forward",
                        "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/300",
                        "attributes": {
                                "isLocked": false,
                                "comment": "Adding traceability to dependencies"
                        }
                }
        ],
        "_links": {
                "self": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299"
                },
                "workItemUpdates": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299/updates"
                },
                "workItemRevisions": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299/revisions"
                },
                "workItemHistory": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299/history"
                },
                "html": {
                        "href": "https://fabrikam.visualstudio.com/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=299"
                },
                "workItemType": {
                        "href": "https://fabrikam.visualstudio.com/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Task"
                },
                "fields": {
                        "href": "https://fabrikam.visualstudio.com/_apis/wit/fields"
                }
        },
        "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299"
}]

Create Multiple WorkItems Sample Request :

PATCH :   https://fabrikam.visualstudio.com/_apis/wit/$batch?api-version=4.1

Request Body :

[{
		"method": "PATCH",
		"uri": "/mytestprojectname/_apis/wit/workitems/$Bug?api-version=4.1",
		"headers": {
			"Content-Type": "application/json-patch+json"
		},
		"body": [{
				"op": "add",
				"path": "/id",
				"value": "-1"
			},
			{
				"op": "add",
				"path": "/fields/System.Title",
				"from": null,
				"value": "Sample 1"
			}
		]
	},
	{
		"method": "PATCH",
		"uri": "/mytestprojectname/_apis/wit/workitems/$Bug?api-version=4.1",
		"headers": {
			"Content-Type": "application/json-patch+json"
		},
		"body": [{
				"op": "add",
				"path": "/id",
				"value": "-2"
			},
			{
				"op": "add",
				"path": "/fields/System.Title",
				"from": null,
				"value": "Sample 2"
			}
		]
	}
]

Sample Response
Status Code: 200 OK

{
	"count": 2,
	"value": [{
			"code": 200,
			"headers": {
				"Content-Type": "application/json; charset=utf-8"
			},
			"body": {
				"id": 5155248,
				"rev": 1,
				"fields": {
					"System.AreaPath": "mytestprojectname",
					"System.TeamProject": "mytestprojectname",
					"System.IterationPath": "mytestprojectname",
					"System.WorkItemType": "Bug",
					"System.State": "New",
					"System.Reason": "New",
					"System.CreatedDate": "2018-06-15T06:42:30.217Z",
					"System.CreatedBy": "My Name<fabikram@microsoft.com>",
					"System.ChangedDate": "2018-06-15T06:42:30.217Z",
					"System.ChangedBy": "My Name<fabikram@microsoft.com>",
					"System.Title": "Sample",
					"Microsoft.VSTS.Common.Severity": "3 - Medium",
					"Microsoft.VSTS.Common.StateChangeDate": "2018-06-15T06:42:30.217Z",
					"Microsoft.VSTS.Common.Priority": 2,
					"Microsoft.VSTS.Common.ValueArea": "Business"
				},
				"_links": {
					"self": {
						"href": "https://fabikram.visualstudio.com/_apis/wit/workItems/5155248"
					},
					"workItemUpdates": {
						"href": "https://fabikram.visualstudio.com/_apis/wit/workItems/5155248/updates"
					},
					"workItemRevisions": {
						"href": "https://fabikram.visualstudio.com/_apis/wit/workItems/5155248/revisions"
					},
					"workItemComments": {
						"href": "https://fabikram.visualstudio.com/_apis/wit/workItems/5155248/comments"
					},
					"html": {
						"href": "https://fabikram.visualstudio.com/web/wi.aspx?pcguid=409b46ee-338d-4001-a354-97892d514d95&id=5155248"
					},
					"workItemType": {
						"href": "https://fabikram.visualstudio.com/b8d62f8d-72b3-486a-b05d-e9571cb7a2bb/_apis/wit/workItemTypes/Bug"
					},
					"fields": {
						"href": "https://fabikram.visualstudio.com/_apis/wit/fields"
					}
				},
				"url": "https://fabikram.visualstudio.com/_apis/wit/workItems/5155248"
			}
		},
		{
			"code": 200,
			"headers": {
				"Content-Type": "application/json; charset=utf-8"
			},
			"body": {
				"id": 5155249,
				"rev": 1,
				"fields": {
					"System.AreaPath": "mytestprojectname",
					"System.TeamProject": "mytestprojectname",
					"System.IterationPath": "mytestprojectname",
					"System.WorkItemType": "Bug",
					"System.State": "New",
					"System.Reason": "New",
					"System.CreatedDate": "2018-06-15T06:42:30.217Z",
					"System.CreatedBy": "My Name<fabikram@microsoft.com>",
					"System.ChangedDate": "2018-06-15T06:42:30.217Z",
					"System.ChangedBy": "My Name<fabikram@microsoft.com>",
					"System.Title": "Sample",
					"Microsoft.VSTS.Common.Severity": "3 - Medium",
					"Microsoft.VSTS.Common.StateChangeDate": "2018-06-15T06:42:30.217Z",
					"Microsoft.VSTS.Common.Priority": 2,
					"Microsoft.VSTS.Common.ValueArea": "Business"
				},
				"_links": {
					"self": {
						"href": "https://fabikram.visualstudio.com/_apis/wit/workItems/5155249"
					},
					"workItemUpdates": {
						"href": "https://fabikram.visualstudio.com/_apis/wit/workItems/5155249/updates"
					},
					"workItemRevisions": {
						"href": "https://fabikram.visualstudio.com/_apis/wit/workItems/5155249/revisions"
					},
					"workItemComments": {
						"href": "https://fabikram.visualstudio.com/_apis/wit/workItems/5155249/comments"
					},
					"html": {
						"href": "https://fabikram.visualstudio.com/web/wi.aspx?pcguid=409b46ee-338d-4001-a354-97892d514d95&id=5155249"
					},
					"workItemType": {
						"href": "https://fabikram.visualstudio.com/b8d62f8d-72b3-486a-b05d-e9571cb7a2bb/_apis/wit/workItemTypes/Bug"
					},
					"fields": {
						"href": "https://fabikram.visualstudio.com/_apis/wit/fields"
					}
				},
				"url": "https://fabikram.visualstudio.com/_apis/wit/workItems/5155249"
			}
		}
	]
}

Validate only update
Sample Request :

PATCH :   https://fabrikam.visualstudio.com/_apis/wit/$batch?api-version=4.1

Request Body :

[{
  "method": "PATCH",
  "uri": "/_apis/wit/workitems/10?api-version=4.1",
  "headers": {
    "Content-Type": "application/json-patch+json"
  },
  "body": [
  {
    "op": "test",
    "path": "/rev",
    "value": 1
  },
  {
    "op": "add",
    "path": "/fields/System.AreaPath",
    "value": "Fabrikam-Fiber-Git\\Website"
  },
  {
    "op": "add",
    "path": "/fields/System.History",
    "value": "Moving to the right area path"
  }
]
  }
]

Sample Response :
Status Code: 200

[
[{
  "id": 299,
  "rev": 2,
  "fields": {
    "System.AreaPath": "Fabrikam-Fiber-Git\\Website",
    "System.TeamProject": "Fabrikam-Fiber-Git",
    "System.IterationPath": "Fabrikam-Fiber-Git",
    "System.WorkItemType": "Task",
    "System.State": "To Do",
    "System.Reason": "New task",
    "System.CreatedDate": "2014-12-29T20:49:21.617Z",
    "System.CreatedBy": "Jamal Hartnett ",
    "System.ChangedDate": "2014-12-29T20:49:23.933Z",
    "System.ChangedBy": "Jamal Hartnett ",
    "System.Title": "JavaScript implementation for Microsoft Account",
    "Microsoft.VSTS.Scheduling.RemainingWork": 4,
    "System.Description": "Follow the code samples from MSDN",
    "System.History": "Moving to the right area path"
  },
  "relations": [
    {
      "rel": "System.LinkTypes.Hierarchy-Reverse",
      "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/297",
      "attributes": {
        "isLocked": false,
        "comment": "decomposition of work"
      }
    }
  ],
  "_links": {
    "self": {
      "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299"
    },
    "workItemUpdates": {
      "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299/updates"
    },
    "workItemRevisions": {
      "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299/revisions"
    },
    "workItemHistory": {
      "href": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299/history"
    },
    "html": {
      "href": "https://fabrikam.visualstudio.com/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=299"
    },
    "workItemType": {
      "href": "https://fabrikam.visualstudio.com/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Task"
    },
    "fields": {
      "href": "https://fabrikam.visualstudio.com/_apis/wit/fields"
    }
  },
  "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/299"
}]
]

Case where single request in batch api fails
If a single request fails then the whole batch api will get failed.

Sample Request :

[
  {
    "method": "PATCH",
    "uri": "/_apis/wit/workitems/12?api-version=4.1",
    "headers": {
	 "Content-Type": "application/json-patch+json"
    },
    "body":[
    	{
        	"op": "add",
        	"path": "/fields/System.History",
        	 "value": "@Jose Rady, I've attached somnew changes 1"
      },
      {
        "op": "add",
        "path": "/relations/-",
        "value": {
          "rel": "Hyperlink",
          "url": "https://msdn.microsoft.com/en-us/library/hh750210.aspx"
        }
      }
    ]
  },
 
  {
    "method": "PATCH",
    "uri": "/_apis/wit/workitems/13?api-version=4.1",
    "headers": {
	 "Content-Type": "application/json-patch+json"
    },
    "body":[
    	{
        	"op": "add",
        	"path": "/fields/System.History",
        	 "value": "@Jose Rady, I've attached somnew changes 2"
      },
      {
        "op": "add",
        "path": "/relations/-",
        "value": {
          "rel": "Hyperlink",
          "url": "https://msdn.microsoft.com/en-us/library/hh750210.aspx"
        }
      }
    ]
  },
 
  {
    "method": "PATCH",
    "uri": "/_apis/wit/workitems/14?api-version=4.1",
    "headers": {
	 "Content-Type": "application/json-patch+json"
    },
    "body":[
    	{
        	"op": "add",
        	"path": "/fields/System.History",
        	 "value": "@Jose Rady, I've attached somnew changes 3 "
      },
      {
        "op": "add",
        "path": "/relations/-",
        "value": {
          "rel": "Hyperlink",
          "url": "https://msdn.microsoft.com/en-us/library/hh750210.aspx"
        }
      }
    ]
  }

]

Sample Response :

{
    "count": 3,
    "value": [
        {
            "code": 400,
            "headers": {
                "Content-Type": "application/json; charset=utf-8"
            },
            "body": "{\"count\":1,\"value\":{\"Message\":\"Relation already exists.\"}}"
        },
        {
            "code": 500,
            "headers": {
                "Content-Type": "application/json; charset=utf-8"
            },
            "body": "{\"count\":1,\"value\":{\"Message\":\"TF401321: Whole Bulk failed.\"}}"
        },
        {
            "code": 500,
            "headers": {
                "Content-Type": "application/json; charset=utf-8"
            },
            "body": "{\"count\":1,\"value\":{\"Message\":\"TF401321: Whole Bulk failed.\"}}"
        }
    ]
}

How to use bypassrule
Sample Request :

[
	 {
    "method": "PATCH",
    "uri": "/_apis/wit/workitems/29?api-version=4.1&bypassRules=true",
    "headers": {
	 "Content-Type": "application/json-patch+json"
    },
    "body":[
    	{
        	"op": "add",
        	"path": "/fields/System.History",
        	 "value": "@Jose Rady, I've attached somnew changes 2"
      },
      {
        "op": "add",
        "path": "/relations/-",
        "value": {
          "rel": "Hyperlink",
          "url": "https://msdn.microsoft.com/en-us/library/hh750210.aspx"
        }
      }
    ]
  },
  {
    "method": "PATCH",
    "uri": "/_apis/wit/workitems/30?api-version=4.1&bypassRules=true",
    "headers": {
	 "Content-Type": "application/json-patch+json"
    },
    "body":[
    	{
        	"op": "add",
        	"path": "/fields/System.History",
        	 "value": "@Jose Rady, I've attached somnew changes 1"
      },
      {
        "op": "add",
        "path": "/relations/-",
        "value": {
          "rel": "Hyperlink",
          "url": "https://msdn.microsoft.com/en-us/library/hh750210.aspx"
        }
      }
    ]
  },
  {
    "method": "PATCH",
    "uri": "/_apis/wit/workitems/31?api-version=4.1&bypassRules=true",
    "headers": {
	 "Content-Type": "application/json-patch+json"
    },
    "body":[
    	{
        	"op": "add",
        	"path": "/fields/System.History",
        	 "value": "@Jose Rady, I've attached somnew changes 3 "
      },
      {
        "op": "add",
        "path": "/relations/-",
        "value": {
          "rel": "Hyperlink",
          "url": "https://msdn.microsoft.com/en-us/library/hh750210.aspx"
        }
      }
    ]
  }
]

Sample Response :

{
    "count": 3,
    "value": [
        {
            "code": 200,
            "headers": {
                "Content-Type": "application/json; charset=utf-8"
            },
            "body": "{\"id\":29,\"rev\":2,\"fields\":{\"System.AreaPath\":\"sample\",\"System.TeamProject\":\"sample\",\"System.IterationPath\":\"sample\",\"System.WorkItemType\":\"Bug\",\"System.State\":\"New\",\"System.Reason\":\"New\",\"System.CreatedDate\":\"2018-05-31T20:15:45.54Z\",\"System.CreatedBy\":\"Nilesh Agrawal <niagraw@microsoft.com>\",\"System.ChangedDate\":\"2018-06-01T00:02:59.493Z\",\"System.ChangedBy\":\"Nilesh Agrawal <niagraw@microsoft.com>\",\"System.Title\":\"Sample task 29\",\"Microsoft.VSTS.Common.StateChangeDate\":\"2018-05-31T20:15:45.54Z\",\"Microsoft.VSTS.Common.Priority\":2,\"Microsoft.VSTS.Common.Severity\":\"3 - Medium\",\"Microsoft.VSTS.Common.ValueArea\":\"Business\",\"System.History\":\"@Jose Rady, I've attached somnew changes 2\"},\"relations\":[{\"rel\":\"Hyperlink\",\"url\":\"https://msdn.microsoft.com/en-us/library/hh750210.aspx\",\"attributes\":{\"authorizedDate\":\"2018-06-01T00:02:59.493Z\",\"id\":18,\"resourceCreatedDate\":\"2018-06-01T00:02:59.493Z\",\"resourceModifiedDate\":\"2018-06-01T00:02:59.493Z\",\"revisedDate\":\"9999-01-01T00:00:00Z\"}}],\"_links\":{\"self\":{\"href\":\"https://niagraw.vsts.me/_apis/wit/workItems/29\"},\"workItemUpdates\":{\"href\":\"https://niagraw.vsts.me/_apis/wit/workItems/29/updates\"},\"workItemRevisions\":{\"href\":\"https://niagraw.vsts.me/_apis/wit/workItems/29/revisions\"},\"workItemComments\":{\"href\":\"https://niagraw.vsts.me/_apis/wit/workItems/29/comments\"},\"html\":{\"href\":\"https://niagraw.vsts.me/web/wi.aspx?pcguid=5e3dff81-bc34-4220-bcee-1f910c81f38f&id=29\"},\"workItemType\":{\"href\":\"https://niagraw.vsts.me/353a1fd5-4165-4127-960b-43f6d6820749/_apis/wit/workItemTypes/Bug\"},\"fields\":{\"href\":\"https://niagraw.vsts.me/_apis/wit/fields\"}},\"url\":\"https://niagraw.vsts.me/_apis/wit/workItems/29\"}"
        },
        {
            "code": 200,
            "headers": {
                "Content-Type": "application/json; charset=utf-8"
            },
            "body": "{\"id\":30,\"rev\":2,\"fields\":{\"System.AreaPath\":\"sample\",\"System.TeamProject\":\"sample\",\"System.IterationPath\":\"sample\",\"System.WorkItemType\":\"Bug\",\"System.State\":\"New\",\"System.Reason\":\"New\",\"System.CreatedDate\":\"2018-05-31T20:15:49.633Z\",\"System.CreatedBy\":\"Nilesh Agrawal <niagraw@microsoft.com>\",\"System.ChangedDate\":\"2018-06-01T00:02:59.493Z\",\"System.ChangedBy\":\"Nilesh Agrawal <niagraw@microsoft.com>\",\"System.Title\":\"Sample task 30\",\"Microsoft.VSTS.Common.StateChangeDate\":\"2018-05-31T20:15:49.633Z\",\"Microsoft.VSTS.Common.Priority\":2,\"Microsoft.VSTS.Common.Severity\":\"3 - Medium\",\"Microsoft.VSTS.Common.ValueArea\":\"Business\",\"System.History\":\"@Jose Rady, I've attached somnew changes 1\"},\"relations\":[{\"rel\":\"Hyperlink\",\"url\":\"https://msdn.microsoft.com/en-us/library/hh750210.aspx\",\"attributes\":{\"authorizedDate\":\"2018-06-01T00:02:59.493Z\",\"id\":19,\"resourceCreatedDate\":\"2018-06-01T00:02:59.493Z\",\"resourceModifiedDate\":\"2018-06-01T00:02:59.493Z\",\"revisedDate\":\"9999-01-01T00:00:00Z\"}}],\"_links\":{\"self\":{\"href\":\"https://niagraw.vsts.me/_apis/wit/workItems/30\"},\"workItemUpdates\":{\"href\":\"https://niagraw.vsts.me/_apis/wit/workItems/30/updates\"},\"workItemRevisions\":{\"href\":\"https://niagraw.vsts.me/_apis/wit/workItems/30/revisions\"},\"workItemComments\":{\"href\":\"https://niagraw.vsts.me/_apis/wit/workItems/30/comments\"},\"html\":{\"href\":\"https://niagraw.vsts.me/web/wi.aspx?pcguid=5e3dff81-bc34-4220-bcee-1f910c81f38f&id=30\"},\"workItemType\":{\"href\":\"https://niagraw.vsts.me/353a1fd5-4165-4127-960b-43f6d6820749/_apis/wit/workItemTypes/Bug\"},\"fields\":{\"href\":\"https://niagraw.vsts.me/_apis/wit/fields\"}},\"url\":\"https://niagraw.vsts.me/_apis/wit/workItems/30\"}"
        },
        {
            "code": 200,
            "headers": {
                "Content-Type": "application/json; charset=utf-8"
            },
            "body": "{\"id\":31,\"rev\":2,\"fields\":{\"System.AreaPath\":\"sample\",\"System.TeamProject\":\"sample\",\"System.IterationPath\":\"sample\",\"System.WorkItemType\":\"Bug\",\"System.State\":\"New\",\"System.Reason\":\"New\",\"System.CreatedDate\":\"2018-05-31T20:15:53.593Z\",\"System.CreatedBy\":\"Nilesh Agrawal <niagraw@microsoft.com>\",\"System.ChangedDate\":\"2018-06-01T00:02:59.493Z\",\"System.ChangedBy\":\"Nilesh Agrawal <niagraw@microsoft.com>\",\"System.Title\":\"Sample task 31\",\"Microsoft.VSTS.Common.StateChangeDate\":\"2018-05-31T20:15:53.593Z\",\"Microsoft.VSTS.Common.Priority\":2,\"Microsoft.VSTS.Common.Severity\":\"3 - Medium\",\"Microsoft.VSTS.Common.ValueArea\":\"Business\",\"System.History\":\"@Jose Rady, I've attached somnew changes 3 \"},\"relations\":[{\"rel\":\"Hyperlink\",\"url\":\"https://msdn.microsoft.com/en-us/library/hh750210.aspx\",\"attributes\":{\"authorizedDate\":\"2018-06-01T00:02:59.493Z\",\"id\":20,\"resourceCreatedDate\":\"2018-06-01T00:02:59.493Z\",\"resourceModifiedDate\":\"2018-06-01T00:02:59.493Z\",\"revisedDate\":\"9999-01-01T00:00:00Z\"}}],\"_links\":{\"self\":{\"href\":\"https://niagraw.vsts.me/_apis/wit/workItems/31\"},\"workItemUpdates\":{\"href\":\"https://niagraw.vsts.me/_apis/wit/workItems/31/updates\"},\"workItemRevisions\":{\"href\":\"https://niagraw.vsts.me/_apis/wit/workItems/31/revisions\"},\"workItemComments\":{\"href\":\"https://niagraw.vsts.me/_apis/wit/workItems/31/comments\"},\"html\":{\"href\":\"https://niagraw.vsts.me/web/wi.aspx?pcguid=5e3dff81-bc34-4220-bcee-1f910c81f38f&id=31\"},\"workItemType\":{\"href\":\"https://niagraw.vsts.me/353a1fd5-4165-4127-960b-43f6d6820749/_apis/wit/workItemTypes/Bug\"},\"fields\":{\"href\":\"https://niagraw.vsts.me/_apis/wit/fields\"}},\"url\":\"https://niagraw.vsts.me/_apis/wit/workItems/31\"}"
        }
    ]
}

Definitions

JsonPatchDocument The JSON model for JSON Patch Operations
Operation The patch operation
ReferenceLinks The class to represent a collection of REST reference links.
WorkItem Describes a work item.
WorkItemRelation Relation to the work item

JsonPatchDocument
The JSON model for JSON Patch Operations

Name Type Description
from string The path to copy from for the Move/Copy operation.
op [Operation] The patch operation
path string The path for the operation
value object The value for the operation. This is either a primitive or a JToken.

Operation
The patch operation

Name Type
copy string
move string
remove string
replace string
test string

ReferenceLinks
The class to represent a collection of REST reference links.

Name Type Description
links <string, object> The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only.

WorkItem
Describes a work item.

Name Type Description
_links [ReferenceLinks] Link references to related REST resources.
fields <string, object> Map of field and values for the work item.
id integer The work item ID.
relations WorkItemRelation Relations of the work item.
rev integer Revision number of the work item.
url string

WorkItemRelation

Name Type Description
attributes <string, object> Collection of link attributes.
rel string Relation type.
url string Link url.