The REST provider is used to populate list data or perform other REST methods using a third-party REST service. The REST provider has many options, one being the local call option.
By default a REST function will split processing between the mobile app (local) and the Jigx REST service (remote). The mobile app wraps the REST call and sends it to the remote Jigx REST function that in turn calls the third-party service. Results are returned to the mobile app from the third-party REST service via the remote Jigx REST function.
When using the remote Jigx REST service the size of data is limited to 6Mb. The only limit to data size when using a local REST function is the third-party REST service. Also, secrets, such as API keys, which are configured in Jigx Management are only processed in the remote Jigx REST service.
A local REST function call is an option that allows the mobile app to perform all the processing locally and call the third-party service directly. As a result, data is only trasferred between the mobile app and the third-party REST service.
Local REST function calls are useful when:
- I have a requirement to not send any data through AWS infrastructure
- My third-party REST service has a limit larger than 6Mb on the amount of data that can be transferred
Remote REST function calls are useful when:
- I have secrets (such as API keys) that I need to secure
- I need to whitelist the calling IP addresses on the third-party service
Quite simply, adding a useLocalCall: true property to a REST function will direct the function call to use local execution. Leaving the property out of the definition or setting it to false will direct the function call to use remote execution.
provider: DATA_PROVIDER_REST url: https://api.weather.gov/alerts/active useLocalCall: true parameters: area: type: string location: query required: true value: WA