Skip to main content
Skip table of contents

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

XML
<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&amp;Content-Type=text/plain</requestheaders>
  <authurl></authurl>
  <clientid></clientid>
  <clientsecret></clientsecret>
  <accesstoken></accesstoken>
  <refreshtoken></refreshtoken>
</Database>

name (required)

A unique UUID. This information is used to refer to the entity in many parts of PocketQuery.

displayname (required)

A unique identifier. This is what users see in the interface when using the Datasource.

type (required)

Determines the Datasource type. The value is always an integer, where:

url (required for REST)

The datasource basic URL. This URL is used for all associated Queries.

user

The username used to log in.

password

The password used to log in.

driver (required for JDBC)

the JDBC Datasource driver. It can be one of the following:

  • com.mysql.jdbc.Driver - for MySQL 5 or 8

  • org.postgresql.Driver - for PostgreSQL

  • com.microsoft.sqlserver.jdbc.SQLServerDriver - for MSSQL

  • Other JDBC drivers are not (yet) supported. Missing some driver? Contact us!

testurl

The URL used for REST datasource testing.

requestparameters

A semicolon-separated list of header names and their values. Each list item has the following format: {NAME}={VALUE}. They will be used in every request. For example: param1=123;anotherParam=abc

requestheaders

A semicolon-separated list of parameters and their values. Each list item has the following format: {NAME}={VALUE}. They will be used in every request. For example:
Authentication=Bearer%202913&amp;Content-Type=text/plain

authurl

The URL of the Authentication Server for OAuth2 Datasources.

clientid

The ID of the Client for OAuth2 Datasources.

clientsecret

The Secret of the Client for OAuth2 Datasources.

accesstoken

An access token for OAuth2 Datasources.

refreshtoken

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

XML
<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>

name (required)

A unique UUID. This information is used to refer to the entity in many parts of PocketQuery.

displayname (required)

A unique identifier. This is what users see in the interface when using the Converter.

content (required)

The body (JavaScript code) of the Converter.

Template

HTML
<Template>
  <name>437088c3-e1f2-4ea6-8677-617deb1142da</name>
  <displayname>T2</displayname>
  <content>
    <h1>$result</h1>
  </content>
</Template>

name (required)

A unique UUID. This information is used to refer to the entity in many parts of PocketQuery.

displayname (required)

A unique identifier. This is what users see in the interface when using the Template.

content (required)

The body (Apache Velocity code) of the Template.

Query

XML
<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>

name (required)

A unique UUID. This information is used to refer to the entity in many parts of PocketQuery.

displayname (required)

A unique UUID. This information is used to refer to the entity in many parts of PocketQuery.

statement (required)

A SQL statement or REST URL used to query the Datasource.

database (required)

The Datasource reference using the datasource ID (the ID has to refer to an existing Datasource).

template

The Template reference using the Template ID (the ID has to refer an existing Template or it can be null to use the default Template)

paramtypes

A semicolon-separated list of parameters and their type. Allowed types are:

  • Boolean

  • Constant

  • Integer

  • ListOfStrings

  • ListOfIntegers

  • String

  • Example: MyParam1=String;MyParam2=ListOfIntegers

converter

The Converter reference using the Converter ID (the ID has to refer to an existing Converter or it can be null to use the default Converter).

JavaScript errors detected

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

If this problem persists, please contact our support.