Skip to main content
Skip table of contents

The PocketQuery Pipeline

You have just learned about the different types of PocketQuery Entities there are. We’ll now have a quick look at how they work together to form the PocketQuery Pipeline.

When you want to use PocketQuery, you insert the PocketQuery macro into a page. The macro will let you select a Query that it shall execute. Upon being viewed, the Query will be executed against its Datasource. The returned data will be piped into a Template that renders your data into HTML and the result will be displayed in your Confluence page.

In the case of REST Datasources, it often happens that the result returned by the Datasource does not match what you want to display in your page. Consider for example this JSON returned by the Jira REST API:

JSON
{
  "expand": "schema,names",
  "startAt": 0,
  "maxResults": 50,
  "total": 2,
  "issues": [
    {"id": 1234, "key": "TEST-1", "fields": {"summary": "Task #1", ...}},
    {"id": 5678, "key": "TEST-2", "fields": {"summary": "Task #2", ...}}
  ]  
}

There’s a lot of unnecessary information in here, that we don’t want to have in our page. Let’s say we only want to display issue keys and summaries:

JSON
[
  {"key": "TEST-1", "summary": "Task #1"},
  {"key": "TEST-2", "summary": "Task #2"}
]

This can be achieved with the use of a Converter which is executed before the data is passed into a Template. Adding the idea of Converters makes the full PocketQuery Pipeline look like this.

Awesome! You are now familiar with how PocketQuery works on a conceptual level. Let’s apply what you’ve learned and create your first Query!

Continue with “Working with SQL Datasources

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.