Resources quickstart
A quickstart tutorial for connecting your first data source to Retool.
A resource is a set of user-configured properties that determine how Retool interacts with a data source, such as an API or database. You create a resource for each data source you want to use with Retool, then select it when writing a query to interact with the data.
This quickstart tutorial walks you through connecting a REST API to Retool as a resource. You will generate a mock API with sample customer data, create a resource for it, and confirm that the resource works.
Get started
First, sign in to Retool or create a new organization.
If you're joining an existing organization, confirm with an admin that you are in a group with Edit all access to resources.
Create a resource
Use the following sections to create a REST API resource using a sample API.
Generate a mock API
Use the mock API generator below to generate a fully functional temporary REST API with sample data that you can use.
- Select the sample data set.
- Specify the number of Items that the data set should include.
- Click Generate API to generate the API with sample data.
- Click Copy URL to copy the API URL to your clipboard.
The mock API is for testing purposes only and does not require authentication. Do not attempt to use it for production purposes or with any type of sensitive information.
Add the resource
- On the Resources page, click Create new and select Resource.
- Select the REST API resource type.
- Name the resource
Customers APIand paste the base URL you copied from the mock API generator. - Click Create resource. A confirmation message appears and prompts you to return to the Resources page or create an app.
Test your resource
You can now use your newly-created resource across Retool.
In the app builder, prompt the app building agent with @ and your resource name to generate functions against it. Check that the function runs successfully and returns the data that you expect.
In classic apps, workflows, and agents, write queries using the REST API query editor.
Share your resource
Access to a resource depends on your organization's permission settings. Users on Free or Team plans can use all resources. Organizations on Business and Enterprise plans manage access to resources through permission groups or role-based access control.
Next steps
Learn more about resources and how to use them.
Queries and code quickstart
Fundamental concepts of queries and code.
Resource query tutorial
Hands-on introduction to querying APIs and databases.
Query REST APIs
Learn how to query REST API resources.
Configure permission groups
Control who can access and edit your resources.