<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ilyas F</title>
    <description>The latest articles on DEV Community by Ilyas F (@ilyasit83).</description>
    <link>https://dev.to/ilyasit83</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F336646%2Fa37ba953-9874-42eb-b5b9-5f18c9a27113.jpeg</url>
      <title>DEV Community: Ilyas F</title>
      <link>https://dev.to/ilyasit83</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ilyasit83"/>
    <language>en</language>
    <item>
      <title>Missing Azure REST APIs. Need not Worry</title>
      <dc:creator>Ilyas F</dc:creator>
      <pubDate>Fri, 14 May 2021 17:10:52 +0000</pubDate>
      <link>https://dev.to/ilyasit83/missing-azure-rest-apis-need-not-worry-36nb</link>
      <guid>https://dev.to/ilyasit83/missing-azure-rest-apis-need-not-worry-36nb</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_IROmIIm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k7z5c3xj5yvrhavy9kj2.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_IROmIIm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k7z5c3xj5yvrhavy9kj2.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Today I came across a situation where I had to automate the process of creating and setting up an Azure IoT Central solution entirely using Azure REST APIs and found they are not available or not documented as of May 14th, 2021. However, you would definitely find &lt;code&gt;AZ CLI&lt;/code&gt; commands available, finding the REST APIs for the specific action is very simple. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.microsoft.com/en-us/cli/azure/iot/central?view=azure-cli-latest"&gt;Azure IoT Central - AZ CLI commands&lt;/a&gt;&lt;br&gt;
&lt;a href="https://docs.microsoft.com/en-us/rest/api/iotcentral/"&gt;Azure IoT Central - REST API reference&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This gap might be fixed when you read this article in the future, so I highly recommend to refer the &lt;a href="https://docs.microsoft.com/en-us/rest/api/iotcentral/"&gt;Azure IoT Central - REST API reference&lt;/a&gt; to check if the APIs are documented. &lt;/p&gt;
&lt;h2&gt;
  
  
  The Solution - AZ CLI to the rescue
&lt;/h2&gt;

&lt;p&gt;Login to your &lt;code&gt;AZ CLI&lt;/code&gt; and set the default subscription.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;az login
&lt;/span&gt;&lt;span class="gp"&gt;az account set -s &amp;lt;&amp;lt;subscription name or id&amp;gt;&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next fire the respective AZ CLI command that you didn't find the REST API, in my case creating a new Azure IoT Central App with the &lt;strong&gt;--debug&lt;/strong&gt; argument.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;az iot central app create --name myiotcentral001
                          --resource-group rg_iotcentral
                          --subdomain myiotcentral001
                          --debug
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will generate a lot of debugging statements, but give your attention to the lines where it makes a call to the REST API. Refer to the below screenshot. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kIBxtz30--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9lpuk51wq81bxtqplqep.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kIBxtz30--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9lpuk51wq81bxtqplqep.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So you know, how to find the REST APIs of Azure!&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Happy Azure!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>azure</category>
      <category>azcli</category>
      <category>azurerestapi</category>
      <category>restfulapi</category>
    </item>
  </channel>
</rss>
