tag:help.appveyor.com,2012-11-13:/discussions/problems/17648-build-api-seems-to-have-changed-to-buildsbuildidAppVeyor: Discussion 2018-11-02T17:42:53Ztag:help.appveyor.com,2012-11-13:Comment/463308232018-10-23T17:23:01Z2018-10-23T17:23:03ZBuild API seems to have changed to `/builds/{buildId}`<div><p>Hey folks,</p>
<p>Today the Atom team noticed that we could no longer access build status using the <a href="https://www.appveyor.com/docs/api/projects-builds/#get-project-build-by-version">documented API</a>, but instead we received a 404 with the following body:</p>
<pre>
<code>{"message":"Build not found or access denied."}</code>
</pre>
<p>Here's a build URI using the documented format: <a href="https://ci.appveyor.com/api/projects/Atom/atom/build/19704089">https://ci.appveyor.com/api/projects/Atom/atom/build/19704089</a></p>
<p>Through a bit of experimentation we discovered that changing <code>/build/</code> to <code>/builds/</code> causes the build link to work as expected:</p>
<p><a href="https://ci.appveyor.com/api/projects/Atom/atom/builds/19704089">https://ci.appveyor.com/api/projects/Atom/atom/builds/19704089</a></p>
<p>Which API form is correct, the one above or the one specified in the API documentation? If this is a legitimate change we'll be happy to update our code.</p>
<p>Thanks!</p>
<p>David</p></div>David Wilsontag:help.appveyor.com,2012-11-13:Comment/463308232018-10-23T17:29:13Z2018-10-23T17:29:13ZBuild API seems to have changed to `/builds/{buildId}`<div><p>Hi David,</p>
<p>The original API for getting build details is still there. It has human-readable build version in its query string:</p>
<pre>
<code>https://ci.appveyor.com/api/projects/{account}/{project-slug}/build/{version}</code>
</pre>
<p>And the newly added API method works with buildId and serves as a "permalink":</p>
<pre>
<code>https://ci.appveyor.com/api/projects/{account}/{project-slug}/builds/{buildId}</code>
</pre>
<p>Please let me know if you have any questions.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/463308232018-10-23T17:34:57Z2018-10-23T17:34:57ZBuild API seems to have changed to `/builds/{buildId}`<div><p>FYI: reason for new API: <a href="https://github.com/appveyor/ci/issues/1074">https://github.com/appveyor/ci/issues/1074</a></p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/463308232018-10-23T17:38:34Z2018-10-23T17:38:35ZBuild API seems to have changed to `/builds/{buildId}`<div><p>Hey Feodor,</p>
<p>Is <code>buildVersion</code> the same thing as <code>buildNumber</code>? We were using <code>buildNumber</code> in the <code>/build/</code> API in the past but it doesn't seem to work anymore. I may have misspoke when i used <code>{buildId}</code> in the original post.</p>
<p>Thanks!</p>
<p>David</p></div>David Wilsontag:help.appveyor.com,2012-11-13:Comment/463308232018-10-23T17:40:59Z2018-10-23T17:40:59ZBuild API seems to have changed to `/builds/{buildId}`<div><p>Nope, [buildVersion] is what you see on UI, e.g. <code>1.0.0</code>. <code>buildNumber</code> has never been supported in API though - <code>buildNumber</code> is just used to "derive" the next <code>buildVersion</code>.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/463308232018-10-23T17:42:08Z2018-10-23T17:42:08ZBuild API seems to have changed to `/builds/{buildId}`<div><p>OK, thanks for the clarification! We'll switch our code to target the new <code>/builds/</code> API that takes the <code>buildId</code>.</p>
<p>Thanks for the help!</p>
<p>David</p></div>David Wilsontag:help.appveyor.com,2012-11-13:Comment/463308232018-10-23T17:43:18Z2018-10-23T17:43:18ZBuild API seems to have changed to `/builds/{buildId}`<div><p>Sure, you are welcome!</p></div>Feodor Fitsner