Query favorites

You can query a list of favorites from the PPM server. The list is returned as an XML file containing the following information for each exported favorite:

Only favorites and favorites folders in the currently queried folder are included. Favorites and favorites folders in subfolders are not included. A query returns all favorites based on any diagram type, EPC view, communication analysis, or Relation Explorer analysis.

An XML data stream is returned with the following structure:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE favoritequeryresult SYSTEM "http://localhost:8080/API_umg_en/dtd/queryapifavorites.dtd">

<favoritequeryresult>

<data>

<favoritenode favoritetype="FOLDER" name="..." path="..."Line break

full-path="..." urlencoded-path="..."/>

...

<favoritenode favoritetype="FAVORITE" name="..." querytype="..."Line break

path="..." full-path="..." urlencoded-path="..."/>

...

</data>

</favoritequeryresult>

The information is specified in the form of XML attribute values.

XML attribute

Description

path

Path of the favorite. It is specified without masking characters.

name

Name of the favorite or favorites folder. It is specified without masking characters.

full-path

Full path of the favorite that also contains the favorite's name. The characters / or \ are used as separators between the path elements. Within the path element names, the characters / and \ are masked, i.e., / is output as // and \ is output as \\.

urlencoded-path

Path and name of the favorite. Both are masked (see full-path) and URL-coded, i.e., special characters are replaced by particular character sequences (e.g., \ is replaced by %5C).

querytype

Query type of the favorite. Valid values:

CHART: Favorite based on charts (2D, 3D, assessment, Gantt)

GRAPH: Favorite based on EPC view, communication analysis, and Relation Explorer

TABLE: Favorite based on tables and Process mining.

INSTANCELIST: Favorites based on instance list, alarm value analysis, process instance search, outlier analysis, and Early alert system.

Is only output if the result is a favorite.

favoritetype

The result is a favorites folder (value FOLDER) or a favorite (value FAVORITE).

The query considers only normal favorites and configuration favorites. Template and multi-analysis favorites are not included.

Query pattern

http://host:port/contextname/urlquery/favorites/query.do?parameterliste

Example

http://localhost:8080/API_demo41_en/urlquery/favorites/query.do?path=<favorites path>

If you have enabled the query interface, you can use in PPM the URL for query interface option in the pop-up menu of a particular favorites folder to copy the corresponding URL to the clipboard. The URL created is already correctly coded and contains the language specified when logging into the PPM front-end in the language argument.

The following optional parameters are supported:

Parameter

Description

path
(optional)

Path of the start node favorites are searched from. Depending on the favoritefolder value, all private or public favorites are searched if this information is missing.

querytype
(optional)

Query type. Valid values:

CHART: Favorites based on charts (2D, 3D, assessment, Gantt)

GRAPH: Favorites based on EPC view, communication analysis, and Relation Explorer

TABLE: Favorites based on tables and Process mining.

INSTANCELIST: Favorites based on instance list, alarm value analysis, process instance search, outlier analysis, and Early alert system.

If querytype is not specified, all query types are returned. You can search for multiple query types by specifying a semicolon-separated list of query types.

favoritetype
(optional)

Specifies if only favorites folders (value FOLDER) or only favorites (value FAVORITE) will be returned.

If this information is missing, favorites and folders will be returned.

favoritefolder
(optional)

Determines whether private (FAVORITES_PRIVATE) or public (FAVORITES_SHARED) favorites are to be queried.
Default value is FAVORITES_SHARED

language

(optional)

Specifies the language of error messages. If this information is missing, error messages are output in the language in which the PPM server was started.

The data for querytype, favoritetype, and favoritefolder must be written in capital letters.

Error messages

If a query cannot be executed correctly, an error XML element is output instead of the data XML element. The text of the error is specified in PCDATA and the identifier in the id attribute.