Azure Mobile Services is a cross-platform mobile app backend service that Microsoft offers in the Azure platform, namely, mobile back-end as a service. Support. NET and JavaScript (node. js) write back-end code, supporting a variety of mainstream front-end platforms, including iOS, Android, Windows, HTML. Provides single sign-on, offline synchronization, access to internal data, push reminders and other functions, but also can be automatically scaled as needed. This makes it very easy to develop a mobile app backend service.
Although Microsoft has provided the SDK for each platform, it is possible to use its rest API directly to manipulate the data on the server side. Adarsha Datta In this article explains how to use the rest API.
After creating an instance of the mobile service and creating a data table, you will get a unique REST API address: Https://<service_name>.azure-mobile.net/tables/<table_ Name> (Domestic is:https://<service_name>.azure-mobile.cn/tables/<table_name>). Then according to the standard Rest API principle, add data is to use post data to this address, query data with get access to this address (support OData standard for filtering operations, etc.), update data is to use patch to submit data to this address (plus "/<item_id > "), delete data is to use Delete to access this address (plus"/<item_id> "), delete support Soft Delete, that is, just tag Delete, this method is particularly useful when dealing with offline and concurrency.
If you feel that these standard HTTP verb access methods for data tables are not enough for you or need to handle more complex business processing on the server side, you can define custom APIs (customized APIs) on the mobile service. In the Mobile Services Control Panel API page, you can add a custom API that accesses the address:https://<service_name>.azure-mobile.net/api/<api_name> (Domestic address is:https://<service_name>.azure-mobile.cn/api/<api_name>). Since we chose JavaScript as the back-end language by default when creating the service, you can write the backend code of the custom API directly in the Azure console. After writing the completed code in node. JS syntax, you can access the custom address through the relevant HTTP verb.
More specific illustrations and code, you can "read the original" to visit, but also recommend that you do. At the beginning of the original, there is a link to the author's other article that explains the contents of the mobile service's. NET SDK.
Read the original: http://blogs.msdn.com/b/cdndevs/archive/2015/04/09/azure-mobile-services-and-apis-restful-and-custom.aspx
Rest API invocation Methods and custom APIs for Azure Mobile Services