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 native integration for your desired data source, you can also connect any REST API or GraphQL API through generic integrations.
In this tutorial, learn how to create a new resource that connects a REST API. The tutorial uses DummyJSON, a free REST API with sample data.
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
DummyJSONand set the Base URL tohttps://dummyjson.com, the base URL of DummyJSON, a free REST API that returns sample data for testing. - 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.