tag:help.appveyor.com,2012-11-13:/discussions/questions/25033-reg-to-find-the-build-is-triggered-through-apiAppVeyor: Discussion 2018-10-24T21:00:38Ztag:help.appveyor.com,2012-11-13:Comment/459552952018-08-24T02:28:46Z2018-08-24T02:28:46ZReg : to find the build is triggered through API.<div><p><code>isTag</code> is not variable, but rather a property of the <code>build</code> object accessible over REST API.</p>
<p>There are actually few <a href="https://www.appveyor.com/docs/environment-variables/">environment variables</a> you may be interested in:</p>
<pre>
<code>APPVEYOR_SCHEDULED_BUILD - True if the build runs by scheduler
APPVEYOR_FORCED_BUILD (True or undefined) - builds started by “New build” button or from the same API
APPVEYOR_RE_BUILD (True or undefined) - build started by “Re-build commit/PR” button of from the same</code>
</pre>
<p>However they are not available over UI or REST API after build finished. If you need to see them for completed build, you can add them to the build message, for example at <code>init</code> stage:</p>
<pre>
<code>install:
- ps: Add-AppveyorMessage -Message "APPVEYOR_FORCED_BUILD: $(!!$env:APPVEYOR_FORCED_BUILD)"</code>
</pre>
<p>After this you can see it in <code>Messages</code> tab for completed build in UI, or with API using the following URL:</p>
<pre>
<code>https://ci.appveyor.com/api/buildjobs/<JobId>/messages</code>
</pre>
<p><code>JobId</code> you can get from URL you mention above. If you have multiple jobs in build matrix, you can use <code>JobId</code> from the first one.</p>
<p>This is kind of hack, thogh it should serve your needs. We plan better approach, it is tracked in <a href="https://github.com/appveyor/ci/issues/2468">https://github.com/appveyor/ci/issues/2468</a>.</p></div>Ilya Finkelshteyn