Connecting to the First REST Datasource
In this section we set up a REST API as a Datasource as well as some Queries using the datasource.
We will use https://jsonplaceholder.typicode.com/, a free-to-use Fake Online REST API.
Create A REST Datasource
Go to the datasources in the PocketQuery administration and add a new one with the type "REST Basic". Give it a reasonable name and set the parameters:
URL: In this case, we will use
https://jsonplaceholder.typicode.com/
Test URL: The test query, that will be used to check if the datasource is set up correctly. In this case use
todos
Username and Password: You can omit username and password here
![](../__attachments/793117016/image-20210617-154722.png?inst-v=1527abee-7a84-47e9-9034-81915ed62bd3)
Test your connection and save it.
Create REST Query
Go to Queries, add a new one and select your new REST datasource as datasource.
Choose a name.
set REST URL to
todos
![](../__attachments/793117016/image-20210617-154739.png?inst-v=1527abee-7a84-47e9-9034-81915ed62bd3)
Press “OK“ to save the query and press “Test Query”. Now click on “Preview“. You should see something looking like this:
![](../__attachments/793117016/image-20210617-154753.png?inst-v=1527abee-7a84-47e9-9034-81915ed62bd3)
Great! You created you first REST Datasource.
Let’s continue with “Add a Converter“