title: VSO Update Build definition - already exists
body: <p>I'm using the Visual Studio Online rest api, and trying to update an existing build definition</p>
  
  <p>So according to the documentation at:
  <a href="https://www.visualstudio.com/en-us/integrate/api/build/definitions#Updateabuilddefinition" rel="nofollow">https://www.visualstudio.com/en-us/integrate/api/build/definitions#Updateabuilddefinition</a></p>
  
  <p>It says you can update an existing build definition.</p>
  
  <p>So I feed the following JSON to the post:</p>
  
  <pre><code>    { 
        id: 43,
        name: 'Test Build',
        revision: 10,
        variables: { 
          version: { value: '20', allowOverride: true } 
        },
        comment: 'New version added: 20' 
      }
  </code></pre>
  
  <p>So the id and revision are the same as the existing build definition.</p>
  
  <p>It fails with the following error:</p>
  
  <pre><code>    {
          "$id":"1",
          "innerException":null,
          "message":"Build definition Test Build already exists for project TestProject.",
          "typeName":"Microsoft.TeamFoundation.Build.WebApi.DefinitionExistsException, Microsoft.TeamFoundation.Build2.WebApi, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
          "typeKey":"DefinitionExistsException",
          "errorCode":0,
          "eventId":3000
      }
  </code></pre>
  
  <p>Any ideas what I'm doing incorrect?</p>