Reference for the /appstats API
The /appstats
API enables you to retrieve daily statistics for agent application and category scores. These statistics are returned in JSON format.
A number of optional parameters are available to enable you to retrieve specific category scores or a select group of agent scores.
Synopsis
GET /appstats/CO_SHORT/ORG_SHORT/APPNAME?token=TOKEN&OPTIONS... GET /appstats/CO_SHORT/ORG_SHORT/APPNAME/FOLDERNAME?token=TOKEN&OPTIONS...
Description
Variables used in a call to the /appstats
API are the following:
- CO_SHORT
The short name of the company whose statistics you would like to retrieve
- ORG_SHORT
The short name of the organization that you are interested in. Finding that information is shown in /transcribe API Reference.
- APPNAME
The name of the V‑Spark application whose agent scores you would like to retrieve.
- FOLDERNAME
The name of the V‑Spark Folder whose statistics you would like to retrieve
- TOKEN
The V‑Spark authorization token that you are using to establish permission to retrieve information. You can either use the root token for the target V‑Spark installation (located in the file /opt/voci/state/vspark/apitoken) or the authorization token for the company under which the specified
ORG_SHORT
is located. Locating a company's authorization token is shown in V‑Spark API Permission Requirements.
Options
- daterange=START-END
Enables you to specify a date range for daily stats. The
START
andEND
values, though optional, are both expressed asYYYYMMDD
values where the year (YYYY
) month (MM
) and day (DD
) values are required. Date ranges are always assumed to be positive (whereSTART
is less thanEND
). No verification is done to ensure that this is correct. Invalid date ranges will simply return no values. IfSTART
is not specified, the default value is today's date. IfEND
is not specified, the start date is used, and only 1 day of stats will be returned.Important
No information is returned for dates in the specified range that do NOT contain any calls.
- category=CATEGORY
Enables you to return Agent Stats for a particular category. To specify a lower-level category, specify
CATEGORY
as a string that contains the full "path" to the lower-level category, as a period-separated list. For example, if querying an app that uses the Agent Scorecard template, a valid category name would beCommunication Skills.Client Informed
. Querying a particular category will always also return scores for the category's upper levels.- depth=DEPTH
Enables you to specify how many lower level categories you would like to return in results:
- 0
Return only the level of the category specified. This is the default value if the category option is specified.
- n
Where
n
is a positive non-zero integer, return the specified number of lower levels of the category- -1
Return all levels of category stats This is the default value if no category option is specified.
- agents=AGENTID
Enables you to specify the agent(s) for which to retrieve scores. If you want to retrieve scores for more than one agent, separate the
AGENTID
s with commas. For example:agents=348,227,042
- zeros
Whether or not to include in the JSON that is returned categories for which the agent did not receive any score.
Note
This parameter refers to returning zero scores for
CATEGORIES
. If a date in the specifieddaterange
does not contain any calls, no scores of any sort will be returned for that date.- true
Include categories in which the agent did not score, and report the score for that category as zero.
- false
Exclude (from the JSON that is returned) categories in which the agent did not receive a score.
Content Types
GET method returns JSON formatted data with the "text/html" MIME type
Errors will be returned with the "text/html" MIME type