Theodorus Agum Gumilang
Theodorus Agum Gumilang

Reputation: 1486

Add more than one api in Azure Mobile App Service

Im Still new in Azure Mobile App Service, i have question about Azure Mobile App Service , Can we make 2 Api and publish it to Azure Mobile App Service. Example my App Service is http://netbackends.azurewebsites.net and i have 2 Web Api that i want to add in the App Service, for instance the web api is one for CRUD users data and the other one is for Payment. Can we do that in App service ? And make Endpoint for calling the Api, example http://netbackends.azurewebsites.net/CRUD or http://netbackends.azurewebsites.net/payment , or we only can have one Api in App service ?

Upvotes: 0

Views: 94

Answers (1)

Tom Sun
Tom Sun

Reputation: 24549

And make Endpoint for calling the Api, example http://netbackends.azurewebsites.net/CRUD or http://netbackends.azurewebsites.net/payment

Sure, we could add the custom APIs as we want. The following is the demo how to add the custom API for a Mobile App. You also could refer to this book to get more information.

1.Create mobile App with VS

enter image description here

2.Add the custom control

enter image description here

3.If we want to use the custom route path we could add the following code in the Startup.MobileApp.cs file

config.MapHttpAttributeRoutes();
settings.SkipVersionCheck = true; //just for test

enter image description here

  1. Add mapped route in the control

enter image description here

  1. Publish it to azure as mobile service and check the result.

enter image description here

Upvotes: 1

Related Questions