All Products
Search
Document Center

Mobile Platform as a Service:HTTP API request format

Last Updated:Jul 21, 2023

The MRPC protocol for connecting mPaaS client and MGS is a HTTP-based RPC protocol. When you call APIs on the API test page in MGS console or call the APIs by using non-mPaaS clients such as Postman, you can construct the RPC requests with reference to the following instruction.

The MRPC protocol for connecting mPaaS client and MGS is a HTTP-based RPC protocol. When you call APIs on the API test page in MGS console or call the APIs by using non-mPaaS clients such as Postman, you can construct the RPC requests with reference to the following instruction.

API test page

In case of calling an API on the API test page, the request parameters should be in [{}] format. If the API back-end service is HTTP service, the query parameters to be delivered to the HTTP get request should be input in [{}], and the body parameters to be delivered to the HTTP post request should be put in the value of the key _requestBody.

Non-mPaaS client

Note

When you directly call APIs through Postman and other non-mPaaS clients, you must turn the Signature verification and Data encryption function switch off in the MGS console in advance, otherwise a request failure may be prompted.

In the figure below, the parameters marked in the red box are fixed, the rest can be replaced with specific API parameters. Note that if the back-end HTTP service is of get type, the post here is still fixed and cannot be changed. You just need to change the method to get on the API details page > Basic information area in the MGS console.image.png

The Body parameters in the request should be in [{}] format. If the API back-end service is HTTP service, the query parameters to be delivered to the HTTP get request should be input in [{}], and the body parameters to be delivered to the HTTP post request should be put in the value of the key _requestBody.