I have to implement reverting changes via Azure REST API, but I've got "Exactly one source for a revert must be specified." message in 400 response. Documentation is poor and I've ran out of ideas, since there is only one source in request. Any ideas?
Request:
var bodyJson = @$"{{
""repository"": {{
""id"": ""{_configuration.Value.RepositoryId}"",
""name"": ""test_repo"",
""url"": ""https://dev.azure.com/xx/yy/_apis/git/repositories/zz"",
""project"": {{
""id"": ""{_configuration.Value.ProjectId}"",
""name"": ""xx"",
""url"": ""https://dev.azure.com/xx/yy/_apis/projects/{_configuration.Value.ProjectId}"",
""state"": ""wellFormed"",
""revision"": {status.Pipeline.Revision}
}},
""defaultBranch"": ""refs/heads/master"",
""remoteUrl"": ""https://dev.azure.com/xx/yy/_git/test_repo""
}},
""source"": {{
""commitList"": [[
{{
""commitId"": ""commitIdWithoutDashes""
}}
]]
}},
""ontoRefName"": ""refs/heads/master"",
""generatedRefName"": ""refs/heads/revert{DateTime.Now.Date.ToShortDateString()}""
}}";