I'm calling the REST API to return all of the files that are changed from a particular changeset, what I really want to do is just return the URL property of a specific item that has a known path.
So what I have now is the Changeset API calling
https://someplace.visualstudio.com/_apis/tfvc/changesets/19483/changes
This return something like
{
"count": 10,
"value": [
{
"item": {
"version": 19483,
"size": 882,
"hashValue": "ACWU0KSlO+jbsSJB5IwU4Q==",
"path": "$/WaveDatabases/MasterData/Custom Scripts/2017-07-17-120218 28 user/MigrationScript.sql",
"url": "https://someplace.visualstudio.com/_apis/tfvc/items/$/WaveDatabases/MasterData/Custom%20Scripts/2017-07-17-120218%2028%20user/MigrationScript.sql?versionType=Changeset&version=19483"
},
"changeType": "add, edit, encoding"
},
{
"item": {
"version": 19483,
"size": 55,
"hashValue": "Wur9rYW/rRYcvRWoVUZO7A==",
"path": "$/WaveDatabases/MasterData/Custom Scripts/2017-07-17-120218 28 user/ReadonlyMetadata.json",
"url": "https://someplace.visualstudio.com/_apis/tfvc/items/$/WaveDatabases/MasterData/Custom%20Scripts/2017-07-17-120218%2028%20user/ReadonlyMetadata.json?versionType=Changeset&version=19483"
},
"changeType": "add, edit, encoding"
},
{
"item": {
"version": 19483,
"size": 379,
"hashValue": "vHCQymsTXiZVuLMpeoShNg==",
"path": "$/WaveDatabases/MasterData/Tables/Cust.test.sql",
"url": "https://someplace.visualstudio.com/_apis/tfvc/items/$/WaveDatabases/MasterData/Tables/Cust.test.sql?versionType=Changeset&version=19483"
},
"changeType": "edit"
}
]
}
This returns an array of all of the files in that changeset. I know that in this changeset there will always be a file called MigrationScript.sql underneath some unknown folder. What I want to do is to find a way that will just return that 1 element in the array that has the MigrationScript.sql in it. Additional I want to only return the url property for that 1 element.
This needs to be accomplished through the URL because of the tools that want to use this I can't write code to parse out the results.