Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Sv translation
languageen

(info) this feature is not available for "public cloud" services.

To retrieve a report subscription via the command line, proceed as follows.

Identify the Report Subscription

You will need the ID of the report subscription. Unfortunately, this is not currently possible via the web interface. You will need to query the database:

Translations Ignore


Code Block
SELECT * FROM ReportSubscriptions WHERE Name = 'My Report Subscription';



Make an note of the returned ID.

Run the Report Subscription

The report subscription can be run via the command line, using the URL specified in the following system parameter:

Translations Ignore

Portal.WebServer.StatisticsServlet.URL

For example:

Translations Ignore

http://acd-lb/CarrierPortal/StatisticsReportsServlet

http GET

To execute the subscription, execute a http GET to the URL, replacing <ID> with the report subscriptions ID:

Translations Ignore


Code Block
http://acd-lb/CarrierPortal/StatisticsReportsServlet?ReportSubscriptions_ID=91



Using curl

Installing curl

If using linux, curl can be installed using the following command:

Translations Ignore


Code Block
yum -y install curl



If using Windows, curl can be installed as part of the cygwin package.

Retrieving with curl

Replace <ID> with the ID of the relevant report subscription:

Translations Ignore


Code Block
curl -k -s http://acd-lb/CarrierPortal/StatisticsReportsServlet?ReportSubscriptions_ID=<ID>



Output

If successful, the output will be XML, which contains the filename of the generated report. 

For example:

Translations Ignore


Code Block
<?xml version='1.0' encoding='UTF-8' ?>
<report>
<filename>
//acd-store/shared/Data/clients/1/reports/Statistics_ReportName_20200301_090000_100.csv
</filename>
</report>



Extract the Report File Name

Parsing the XML

If you are using a programming language or script language which can parse XML, then you can extract the filename of the generated report using the following XPath expression:

Translations Ignore


Code Block
/report/filename



Using the Command Line

If you are using curl from cygwin or from linux, you can extract the filename using sed as follows:

Translations Ignore


Code Block
curl -k -s http://acd-lb/CarrierPortal/StatisticsReportsServlet?ReportSubscriptions_ID=<ID> | sed -n '4 p'



This will return the extracted filename to stdout.


Sv translation
languagede

Status
colourRed
titleThis page is only available in English

Sv translation
languagefr

(info) cette fonctionnalité n'est pas disponible pour les services "cloud public"

Pour récupérer un abonnement à un rapport via la ligne de commande, procédez comme suit.

Identifier l'abonnement au rapport

Vous aurez besoin de l'ID de l'abonnement au rapport. Malheureusement, cela n'est pas possible actuellement via l'interface web. Vous devrez interroger la base de données :

To retrieve a report subscription via the command line, proceed as follows.

Identify the Report Subscription

You will need the ID of the report subscription. Unfortunately, this is not currently possible via the web interface. You will need to query the database:

Translations Ignore


Code Block
SELECT * FROM ReportSubscriptions WHERE Name = 'My Report Subscription';

Make an note of the returned ID.

Run the Report Subscription

The report subscription can be run via the command line, using the URL specified in the following system parameter:



Prenez note de la pièce d'identité retournée.

Exécuter l'abonnement aux rapports

L'abonnement au rapport peut être lancé via la ligne de commande, en utilisant l'URL spécifiée dans le paramètre système suivant:

Translations Ignore

Portal.WebServer.StatisticsServlet.URL

For example:

Par exemple:

Translations Ignore

http://acd-lb/CarrierPortal/StatisticsReportsServlet

http GET

To execute the subscription, execute a http GET to the URL, replacing <ID> with the report subscriptions ID:

Pour exécuter l'abonnement, exécutez un GET http à l'URL, en remplaçant <ID> par l'ID d'abonnement au rapport:

Translations Ignore


Code Block
http://acd-lb/CarrierPortal/StatisticsReportsServlet?ReportSubscriptions_ID=91
Using



Utilisation de curl

Installing

Installation de curl

If using

Si vous utilisez linux, curl

can be installed using the following command:

peut être installé à l'aide de la commande suivante:

Translations Ignore


Code Block
yum -y install curl
If using



Si vous utilisez Windows, curl

can be installed as part of the cygwin package.

Retrieving with curl

Replace <ID> with the ID of the relevant report subscription:

peut être installé en tant que partie intégrante du paquet cygwin.

Récupération avec CURL

Remplacez <ID> par l'identifiant de l'abonnement au rapport concerné:

Translations Ignore


Code Block
curl -k -s http://acd-lb/CarrierPortal/StatisticsReportsServlet?ReportSubscriptions_ID=<ID>

Output

If successful, the output will be XML, which contains the filename of the generated report. 



Sortie

En cas de succès, la sortie sera XML, qui contient le nom de fichier du rapport généré. 

Par exemple:

Translations Ignore
For example:


Code Block
<?xml version='1.0' encoding='UTF-8' ?>
 <report>
 <filename>
 //acd-store/shared/Data/clients/1/reports/Statistics_ReportName_20200301_090000_100.csv
 </filename>
 </report>

Extract the Report File Name

Parsing the XML

If you are using a programming language or script language which can parse XML, then you can extract the filename of the generated report using the following XPath expression:



Extraire le nom du fichier de rapport

Analyser le XML

Si vous utilisez un langage de programmation ou un langage de script qui peut analyser XML, vous pouvez alors extraire le nom de fichier du rapport généré en utilisant l'expression XPath suivante:

Translations Ignore


Code Block
/report/filename

Using the Command Line



Utilisation de la ligne de commande

Si vous utilisez curl à partir de cygwin ou de linux, vous pouvez extraire le nom du fichier en utilisant sed comme suit:

Translations Ignore
If you are using curl from cygwin or from linux, you can extract the filename using sed as follows:


Code Block
curl -k -s http://acd-lb/CarrierPortal/StatisticsReportsServlet?ReportSubscriptions_ID=<ID> | sed -n '4 p'
This will return the extracted filename to



Le nom de fichier extrait sera alors renvoyé à stdout.