How-to: Deploy your API App to Microsoft Azure

In my previous blog post I created a new API App. In this blog post we will deploy it to Microsoft Azure.

In the solution explorer, right-click on the project and click “Publish”.

Click the Profile tab and click on “Microsoft Azure API Apps (Preview).

You can “sign in” or “import your subscription”.

Then you can see the following

We will create a new one. Just click on the “New” button.
You get a new screen like below.

– Fill in a name
– Select an Existing “App Service Plan” or Create a new one.
– Select the Access Level you need. You can change it later.

Click on the “OK” button. You will see the following screen.
Just click on the “OK” button

Now you will see the following. (This can take a couple minutes)

When it’s done,you will see the following.

Now the “API App” is provisioned, we need to deploy our code to that App.
I will explain how you can do that.

Right click again on publish on you API App like we did before. The publish profile that we created before will be pre-selected.

Click on the “Publish” button to publish this API to Azure.
After a while you will see the following.

As you can see he can’t restart the gateway. So we need to restart it manually in the Azure Portal.
Go to your new API App.

Click on the “Gateway” Uri.
Then Click on the “Restart” button. Now your gateway has been restarted.

Now we can test our API. Go back to your API App. You will see the “API definition” tile.

When you click on that one. You will get the following.

You can now use the “API App”.

If you browse to it with your browser our something like postman (chrome) or fiddler.
You can see the ToDo’s we created in our code.

If you have any questions. Don’t hesitate to contact me.
I hope it’s now clear how to deploy an API App.