Creating your first REST Query
You probably know how to create a Query at this point, so quickly head over to the Queries tab and hit the “Create” button.
![](../__attachments/900169789/create_query.png?inst-v=1527abee-7a84-47e9-9034-81915ed62bd3)
After you select “REST Countries” as the Datasource for your Query, you’ll see that there’s a difference to SQL Queries now. Instead of an editor for an SQL Statement, you will now see the base URL of your REST Datasource, and a field for a path that will be appended to it. Just like with SQL, you can use parameters here.
Field | Value |
---|---|
Name |
|
Datasource |
|
REST URL |
|
![](../__attachments/900169789/image-20220201-213824.png?inst-v=1527abee-7a84-47e9-9034-81915ed62bd3)
Click “Create Query” to save it, and let’s try it out! Go to a Confluence page and insert the PocketQuery macro again. In the macro editor, specify a value for the regional
parameter. Example: Europe
![](../__attachments/900169789/image-20220201-214004.png?inst-v=1527abee-7a84-47e9-9034-81915ed62bd3)
There we go! Our first REST Query presents us a table of data…
![](../__attachments/900169789/image-20220201-214234.png?inst-v=1527abee-7a84-47e9-9034-81915ed62bd3)
But what’s this? Looks like there’s some data in our result that is displayed weirdly. Also, there are a lot of columns that we actually don’t need. So, let’s learn how we can format the result of a Query to fit our needs.
Continue with “Filtering the result of your Query with a Converter“