📈
Knowledge base
  • Getting started (placeholder)
  • Basics
    • Intro (placeholder)
      • "Hello world of PWA!" app
      • Testing the App
      • How to hide / show screen elements
      • Create user actions: switch screens, change data and make API calls
      • Screens
      • Show any platform Data in app ellements
      • Showing Data in app - Filters
      • Loops - display multiple line results in app
      • Automating Business Processes & Funnels via Triggers
      • Send and Receive data via external API integrations
      • Chaining API calls
      • Use MathJS formulas
  • PWAbility
    • PWAbility
      • App distribution
      • Saving Mobsted PWA App
      • Smart Messaging
      • Guaranteed delivery
      • Offline Mode
  • Messengers
    • Intro (placeholder)
      • Set up VK bot
      • Set up Facebook bot
      • Set up Telegram Bot
      • Set up Viber bot
  • Data
    • Import data (placeholder)
    • Export data (placeholder)
  • References
    • Intro(placeholder)
      • Constructor elements to build your app
      • Filter any backend and Object data
      • Manage app users and objects
      • Events
      • Statuses
      • Hashtags
      • Variables
      • Lists (placeholder)
      • User Access
      • API Description (placeholder)
Powered by GitBook
On this page

Was this helpful?

  1. Basics
  2. Intro (placeholder)

Chaining API calls

Complex filters & API calls

PreviousSend and Receive data via external API integrationsNextUse MathJS formulas

Last updated 5 years ago

Was this helpful?

In we used API call to third party service to check weather in the city. Now we extend it by passing the data to the next API call. We will use next API call to save the weather data into internal platform storage - column LastCityTemperature in Objects.

Steps to take:

Make sure you have accomplished the steps described in article before implementing the steps below.

  1. CREATE API OPERATION FROM MOBSTED API

  2. PASS THE PARAMETERS INTO THE API OPERATION

  3. CREATE USER VIEW

  4. CHECK RESULT

_____________________________________________

CREATE API OPERATION FROM MOBSTED API

  1. Navigate to MY PROFILE section in the top right corner

  2. Go to Keys tab

  3. Copy Primary and Secondary Key to your favorite note app

  4. Navigate to API Providers section in the left hand side menu and click Add API Provider

  5. Fill in:

    • Name: Mobsted 1

    • Base URL: https://demoapp-admin.mobsted.com

  6. Click Save API Provider and then click Create New API Provider Method

  7. Name the fields:

    • Api Provider Method Name: Weather to Column Method 1

    • Method: PUT

    • Endpoint URL: /api/v8/object/#Object:id#

    • Consumes Type: application/x-www-form-urlencoded

    • Produces Type: application/json

  8. Click Add Parameter at the bottom of the pop up and fill in the fields:

    • Name: applicationId

    • In: query

    • Type: Integer

    • Description: Application ID

    • Check the box Required

    • Click Save Parameter

  9. Click Add Parameter again and fill in the fields:

    1. Name: LastCityTemperature

    2. In: query

    3. Type: String

    4. Description: Last City Temperature

    5. Check the box Required

    6. Click Save Parameter and then Save API Provider Method

    7. Click Close NOTE: the name of this parameter must match the name of your column that will store the temperature (LastCityTemperature)

  10. Go to API KEYS tab and click Create New API Key

  11. On API Key - Create page fill in the fields:

    • Api Key Name: Mobsted Key

    • Method: Basic

    • For Key1 and Key2: copy-paste the keys you've copied on step 1-с

  12. Click Save and then Close.

__________________________________________

PASS PARAMETERS INTO API OPERATION

  1. Click Operations in the left hand side menu

  2. Click Add Operation

  3. Open Mobsted 1 drop down on the left, select Weather to Column Method 1 that we created on the previous step

  4. Fill in the field: Operation Name: Weather to Column Operation 1

  5. In the EXECUTION section fill in the parameters:

    1. API Key: Mobsted Key

    2. applicationId: 1

    3. LastCityTemperature: #Variable:varTemp#

  6. Click Save Operation.

____________________

CREATE USER VIEW

  1. Select button Check #Backendname:city# and click Actions, and then Add new Action

  2. From the drop down select Set Variable, click Add item and fill in:

    • Name: varTemp

    • Value: #Backendname:city# : #Operation:weather Operation:Response:Result[0]:current.temp_c#

  3. Click Save

  1. Click Add action, select Execute Operations from the first drop down and select Weather to Column Operation 1

  2. Click Save

    1. Backendname: LastCity

    2. Text: Last Check: #Object:LastCityTemperature#

  3. Click Add Conditions in Visibility block in the Properties

  4. Click Save screen.

________________

CHECK RESULT

Click Preview button to launch the app from the current screen to check it works.

You can check the set up described on screen - 14 Chaining Internal API in Demo App in your profile.

MENTIONED ARTICLES

RECOMMENDED ARTICLES

Navigate to Constructor to the screen created with

Drag and Drop element under the element where we display the current temperature, fill in it's properties:

Fill in the first field in Hide conditions with: #Object:LastCityTemperature#

previous steps
Constructor elements
Use any external & internal API
Automate with triggers
Hashtags
previous example
Use any external & internal API
Text