REST Field Type

The REST field type enables you to issue a REST request in JSON or XML to an external web service and pull data from pretty much any API
The result of the request is stored in the REST field, and you can then access the result’s values through our existing JSONVAL() and XMLVAL() formula functions.

 

Note, this field requires internet connectivity.
You also need to ensure that the app user account being used is a Premium type, as the REST field is a Premium feature.

 


Configuring your REST Field

 

 

Simply drag 'n drop a REST field from the left-hand toolbar onto your Form page, then configure it using the right-hand properties panel.

 

Rest Request

Provide the details of the REST web service request that the app should issue.

 

Destination URL. This can be built up using our formula builder.

REST Verb - GET, POST, PUT or DELETE

REST Format - REST services support JSON and XML formats for input and output data by default. The default format is JSON.

 

 

If you're scenario requires pushing repeatable captured data from a form in the request body, we suggest you take a look at our REST Connector, customising the request body.

 

 

 

Request Body -  Specify an optional payload in JSON or XML (depending on the format selected).

Use our standard Data Template syntax to inject field values and formula results.

e.g.
{
'MyJsonProperty': '{{myfieldvalue}}'
}

 

 

Request Headers

Specify optional headers to be sent with the request.

Use our standard Data Template syntax to inject field values and formula results.

e.g. {{myfieldvalue}}

 

Values will be URL encoded.

e.g. 'Value@#$%' will become 'Value%40%23%24%25'

 

 

Dialog Message

This displays a custom dialog message while the request is being executed

 

 

Request Trigger

Specify when the request should be executed.

On Form Load: Triggers the request to fire once the form has loaded successfully.

On Condition: Triggers the request once the specified condition evaluates to true.

 

 

 

Request Condition

Controls when to execute this request by evaluating a formula with a true/false result.

e.g. NOTBLANK({{myActionField}}) will fire this request when myActionField's button is pressed.

 


REST Weather Example App

To help you get acquainted with this field type, we've created an example app that we've published to our Examples Catalog.

This example app utilizes a free account at APIXU to demonstrate how to connect to an API to pull current weather information.
This account has limitations of 10 000 API calls per month.

To make use of this API in your own solutions:

► Step 1 - The request requires an API key which you can acquire by signing up for your own account.
Get your own API Key on the link below:
https://www.apixu.com/signup.aspx
► Step 2 - Next, update the hidden field, apiKey with your key.
► Step 3 - Test or Publish the form
► Step 4 - Open the Form on your mobile device and select a country from the drop-down below.

  • 0 Korisnici koji smatraju članak korisnim
Je li Vam ovaj odgovor pomogao?

Vezani članci

Date/Time Field Type

When needing to capture temporal data, use our Date/Time field.As the name implies, this Form...

Gallery Field Type

  This is an advanced field type that allows a user to upload multiple images into a form...

NFC Field Type

The NFC field type allows you to build Form screens that can read and write NFC tags using...

Sketch Field Type

  A Sketch Field Type can be used to capture signatures and can also be used to annotate...

Contactless Signature

  Our Signature field allows for the capturing of signatures on a device in one of...