Create a resource tutorial
Learn how to create a resource, which you can access via queries in apps and workflows.
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. You can then select the resource when writing a query so you can interact with the data.
Retool provides a number of pre-built integrations that enable you to connect third-party providers with Retool as resources. If there isn't a built-in integration for your desired data source, you can also connect any REST API or GraphQL API
In this tutorial, learn how to create a new resource that connects a REST API.
Generate a mock API with customer data
Use the mock API generator below to generate a fully functional temporary REST API with customer data that you can use.
- Select the Customers 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 base URL to your clipboard.
Create a new resource
The easiest way to create a new resource is from the Resources page. On this page, complete the following steps to create a new REST API resource:
- Click Create new, and select Resource from the dropdown menu.
- Select the REST API resource type from the list of resources.
- Name the resource and paste the base URL you retrieved in the previous step.
- Click Create resource to finalize the creation of your resource. A confirmation message appears and prompts you to return to the Resources page or create an app.
Use the new resource
You can use your newly-created resource in web apps, mobile apps, and workflows. Refer to the following guides for more information about querying resources.
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.