XML Import: How to Fix Failed Entity
This page describes the PocketQuery import/export XML Entity structure. You can use this guide to fix your import file manually. For JSON import, the entities are described in JSON Import: How to Fix Failed Entity.
Datasource
<Database>
<name>2b92600a-1bf7-431f-bcad-eb6199e0590d</name>
<displayname>REST Countries</displayname>
<type>4</type>
<url>https://restcountries.eu/rest/v2</url>
<user></user>
<password></password>
<driver></driver>
<resourcename>java:comp/env/</resourcename>
<testurl></testurl>
<applicationlinkid></applicationlinkid>
<consumerkey></consumerkey>
<consumersecret></consumersecret>
<token></token>
<tokensecret></tokensecret>
<signaturemethod></signaturemethod>
<requestparameters>param1=123;anotherParam=abc</requestparameters>
<requestheaders>Authentication=Bearer%202913&Content-Type=text/plain</requestheaders>
<authurl></authurl>
<clientid></clientid>
<clientsecret></clientsecret>
<accesstoken></accesstoken>
<refreshtoken></refreshtoken>
</Database>
| A unique UUID. This information is used to refer to the entity in many parts of PocketQuery. |
| A unique identifier. This is what users see in the interface when using the Datasource. |
| Determines the Datasource type. The value is always an integer, where:
|
| The datasource basic URL. This URL is used for all associated Queries. |
| The username used to log in. |
| The password used to log in. |
| the JDBC Datasource driver. It can be one of the following:
|
| The URL used for REST datasource testing. |
| A semicolon-separated list of header names and their values. Each list item has the following format: |
| A semicolon-separated list of parameters and their values. Each list item has the following format: |
| The URL of the Authentication Server for OAuth2 Datasources. |
| The ID of the Client for OAuth2 Datasources. |
| The Secret of the Client for OAuth2 Datasources. |
| An access token for OAuth2 Datasources. |
| A refresh token for OAuth2 Datasources. |
Other fields are not used in the Cloud version! In the case they contain a value, you will see a warning and the field will be automatically ignored.
Converter
<Converter>
<name>974ae81c-0a0e-439e-bd85-bda84e1890d0</name>
<displayname>REST Countries</displayname>
<content>
function convert(json) {
return JSON.parse(json).map(country => {
return {
"Flag": country.flag
}
});
}
</content>
</Converter>
| A unique UUID. This information is used to refer to the entity in many parts of PocketQuery. |
| A unique identifier. This is what users see in the interface when using the Converter. |
| The body (JavaScript code) of the Converter. |
Template
<Template>
<name>437088c3-e1f2-4ea6-8677-617deb1142da</name>
<displayname>T2</displayname>
<content>
<h1>$result</h1>
</content>
</Template>
| A unique UUID. This information is used to refer to the entity in many parts of PocketQuery. |
| A unique identifier. This is what users see in the interface when using the Template. |
| The body (Apache Velocity code) of the Template. |
Query
<Query>
<name>a21390ce-29be-435f-ab30-f7752e3f6042</name>
<displayname>Countries first</displayname>
<statement>/</statement>
<database>2b92600a-1bf7-431f-bcad-eb6199e0590d</database>
<template>f1486d6f-234b-434e-b8d6-d20ef4890d2f</template>
<spaces></spaces>
<indexed>false</indexed>
<paramtypes class="tree-map"/>
<cacheduration></cacheduration>
<jsonpath></jsonpath>
<converter>974ae81c-0a0e-439e-bd85-bda84e1890d0</converter>
</Query>
| A unique UUID. This information is used to refer to the entity in many parts of PocketQuery. |
| A unique UUID. This information is used to refer to the entity in many parts of PocketQuery. |
| A SQL statement or REST URL used to query the Datasource. |
| The Datasource reference using the datasource ID (the ID has to refer to an existing Datasource). |
| The Template reference using the Template ID (the ID has to refer an existing Template or it can be |
| A semicolon-separated list of parameters and their type. Allowed types are:
|
| The Converter reference using the Converter ID (the ID has to refer to an existing Converter or it can be |