pixiGetApplicationUsageStatistic
Returns, per day, the pixi* client applications that were open at the snapshot with the most connected users, or only the list of applications used.
Evaluates the login snapshots stored in UsersLoggedIn to show which pixi* clients were in use when the licence usage peaked on each day.
- For every snapshot (
Tag), the logged-in sessions are counted. Sessions whoseUserNamematches aComputerNameinMasterUsersand sessions whoseUserNameUsingPixiismasterare excluded. - For each calendar day (date part of
Tag), the snapshot with the highest session count is selected. On a tie, the latest snapshot of that day wins. - For the selected snapshot of each day, the sessions are counted per application (
AppName), using the same exclusions. - The technical application names are translated into readable names via a fixed, built-in list (e.g.
BinClient_A.exe→Lager,ShippingClient_A.exe→Versand, several web components →Web pixi*). Applications that are not in this list are dropped from the result.
Output depends on ShowOnlyApplicationsused:
0(default): one row per day and application with the session count, sorted byTag_DateandApplicationFormatted.1: only the distinct list of applications (technical and readable name) that occurred in any daily peak snapshot, without a defined sort order.
There is no date filter; all snapshots in UsersLoggedIn are evaluated.
Notes
- All reads on
UsersLoggedInandMasterUsersuseNOLOCK, so results may include uncommitted data. - Sessions with
UserNameUsingPixi= NULL are also excluded, because the comparison withmasteris not true for NULL. - Several technical names map to the same readable name (e.g.
PixiPOS.exeandPPOS2.exe→POS; four web components →Web pixi*). In mode0this can produce several rows with the sameApplicationFormattedon one day; group byApplicationFormattedon the client if a combined figure is needed. - Whether
AppNamematches the translation list case-insensitively depends on the database collation. - Since the whole history of
UsersLoggedInis processed, the call can be slow on large tables. - Temporary tables are cleaned up via
util.TempTableDrop(definition not attached).
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
ShowOnlyApplicationsused
|
bit boolean |
0 |
Controls the output: Allowed values
Example: |
Response
Result set 1 · If ShowOnlyApplicationsused = 0 (default)
One row per day and application at the daily peak snapshot, sorted by Tag_Date and ApplicationFormatted.
| Column | Type | Description |
|---|---|---|
Tag_Date
Nullable |
datetime dateTime |
Day of the peak snapshot (time part is always 00:00). |
Application
Nullable |
string |
Technical application name from |
ApplicationFormatted
|
varchar(22) string |
Readable application name from the built-in translation list. |
Total
|
int |
Number of sessions of this application in the day's peak snapshot. |
Result set 2 · If ShowOnlyApplicationsused = 1
Distinct list of applications that occurred in any daily peak snapshot; no defined sort order.
| Column | Type | Description |
|---|---|---|
Application
Nullable |
string |
Technical application name from |
ApplicationFormatted
|
varchar(22) string |
Readable application name from the built-in translation list. |
Response example
<SqlRowSet1>
<row>
<Tag_Date>2024-03-11T00:00:00</Tag_Date>
<Application>BinClient_A.exe</Application>
<ApplicationFormatted>Lager</ApplicationFormatted>
<Total>5</Total>
</row>
<row>
<Tag_Date>2024-03-11T00:00:00</Tag_Date>
<Application>ShippingClient_A.exe</Application>
<ApplicationFormatted>Versand</ApplicationFormatted>
<Total>3</Total>
</row>
</SqlRowSet1>
Examples
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
Authorization: Basic BASE64(USERNAME:PASSWORD)
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiGetApplicationUsageStatistic>
<!-- <ShowOnlyApplicationsused>0</ShowOnlyApplicationsused> -->
</ns1:pixiGetApplicationUsageStatistic>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
curl -X POST 'https://apigateway.descartes.com/tms/pixi/' \
--user 'USERNAME:PASSWORD' \
--header 'Content-Type: text/xml; charset=utf-8' \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiGetApplicationUsageStatistic>
<!-- <ShowOnlyApplicationsused>0</ShowOnlyApplicationsused> -->
</ns1:pixiGetApplicationUsageStatistic>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML
<?php
$soapClient = new SoapClient(null, [
'login' => 'USERNAME',
'password' => 'PASSWORD',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
]);
$arguments = [
// 'ShowOnlyApplicationsused' => '0',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiGetApplicationUsageStatistic', $soapArguments);
Tables used
- SQL object:
- dbo.pipiGetApplicationUsageStatistic