Data Providers
REST

Create an app using REST APIs

4min
by integrating external rest apis into your jigx solutions, you can significantly enrich your apps with a wide range of data and functionality from various external sources, enhancing the overall user experience rest concepts how to define the get, put, push, and delete rest operations in {{jigx}} functions how to define the rest parameters, headers, continuation, and body in the functions how to configure input and output transforms in functions how {{jigx}} automatically syncs the ids for new customers created in rest api to the {{jigx}} local data provider (tempid to id useful when the app is offline) how to convert images into a format that is acceptable for rest and for {{jigx}} how to get the image metadata using output transform how to reference the data in {{jig}} s (screens) and call the functions in actions what is created in this section, a rest api is used to create a customer {{jigx}} app that allows you to functions & jigs functionality description list customers (get) docid 1o2k7 ccuvzfbg7x7f4r2 view a list of customers by status delete customer (delete) docid\ ncd b0etypbxgvz6toopm delete customers by swiping left create customer (post) docid\ yqzusitzjjal k5xxyyu6 capture new customers in a form update customer details (put) docid\ ypln0sk0 dr0prcs532ao update customer details by swiping left on the list and selecting view, which populates a form with the customer's details with an update button list & view customers (get) docid\ a1q39ukncd36o9tfjqkoa return a list of customers in batches ( continuation ) and view customer details where addresses and phone are complex rest structures ( jsonproperties ) list product images (get) docid 6ozzkl2sllujozvvvpxh3 view customer details, locations, and product images in a composite {{jig}} upload product images (post) docid\ qp0owmjuygmgyenn9826j upload product images for the customer high level steps the rest data provider is used in {{jigx}} to integrate with rest in this section, we follow these high level steps identify the rest api to be used as your data source define a rest service in a {{jigx}} function in {{jigxbuilder}} configure rest authentication (if required) define data operations in the function, such as get, post, put, and delete for each operation, create a new function to specify the endpoint, required headers, url parameters, input and output transforms, continuation, and body content if applicable reference the jigx functions in {{jig}} s publish your solution test the data provider when using the code and samples in this topic, remember that they are designed to function as part of a comprehensive solution to fully benefit from the intended functionality and ensure compatibility, it is recommended that you use the entire solution rather than selecting individual components in isolation alternatively, you can use these samples as a guide to understand the underlying concepts and rest api, which can help you integrate similar solutions into your projects more effectively