Data Web Service

All data from Perfion can be queried via a single method.

string ExecuteQuery( string query );

Parameters for the method:

Parameter

Description

string query

XML formatted search.

The Perfion Query XML is separated into the sections: <Select>, <From>, <Where>, <Having> and <Order>.

The syntax is inspired by normal SQL and should therefore be easy to learn.

As input, the method takes a Perfion Query in XML-format or JSON-format. The syntax is inspired by normal SQL, but is enhanced with the ability to return multi-valued and sequenced data as well as localized data in multiple languages, and a number of other advanced abilities not possible with the regular SQL tabular result format.

The method returns all data in XML-format. For binary features such as images and files, the binaryID GUID value is returned. The actual Binary data can then be retrieved via the File & Image Server, as described in another section of this document.

Calling the Web Service with authentication

If authentication has been enabled during installation and configuration of the Perfion API Service (please refer to the Perfion API - Installation Guide), any call to the GetData endpoint must be authenticated.

Please refer to Authentication for a description of how to authenticate against the data endpoint.

Getting Perfion API Version

To know the Perfion API version one can call the following method:

string GetVersion();

Proportioning of Multiple Images

To display multiple images side-by-side it may sometimes be necessary to scale these using the same DPI, otherwise the size of the contents of the images will look wrong when compared to one another.

The following method can calculate which DPI resolution to use for scaling a list of images so each one of them will fit within the specified width x height frame and match each other proportionately.

float CalcImageScale( int maxWidth, int maxHight, Guid[] imageIDs );

Parameters for the method:

Parameter

Description

int maxWidth

Max. width (in pixels) that every one of the specified images must fit within.

int maxHeight

Max. height (in pixels) that every one of the specified images must fit within.

Guid[] imageIDs

List of images that are to be scaled equally.

Â