Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Method is an action, which is performed when API Request is sent to the server. To create one do the following steps:

Navigate to API Providers (RED MARK) section on the Side Top Menu of Mobsted platform 

Image Added


Select the API providerprovider (RED MARK), for which you want to create API method

Image Added


In the pop up opened go to the API Provider Methods tab tab (RED MARK)

Image Added


Click Create new API Provider MethodMethod (ORANGE MARK)

Image Added


Fill in the following fields (RED MARK):

  • Api Provider Method Name
  • Method - select one of the available HTTP request methods (GET, POST, PUT, DELETE)
  • Endpoint URL
  • Consumes Type - select the data type used when sending the API request
  • Produces Type - elect select the response type to the request sent by the API
  • Parameters - create the required and optional parameters for your API method

Most API queries must contain a number of parameters.

Image Added


To create a parameter, click the Add Parameter button. (RED MARK)

Image Added


In the pop up opened fill in the following fields :

...

Click Save Parameter. If the API method should contain several parameters, then repeat the above steps.

Image Added


Click Save API Provider Method

Image Added


Click Close to return to API Provider settings.


Optional step

To use the API method's response in your Mobile App ( Data references in app ) you can add one or several responses.


Let's see an one example

Your API method provide these responses:

Image Added

Image Added


Click Add New Response

Image Added


Fill in the following fields (RED MARK):

  • Response name
  • Response type 
  • Response text 

Image Added


Click Save

Image Added

Now this response and data in response text will be available in your Mobile App