From Bright Pattern Documentation
Jump to: navigation, search
Tracy (talk | contribs)
Created page with "<translate> = Get subscription data = Gets statistics data of an active subscription. == URI == https://{host:port}/statsapi/subscription/data == HTTP Method == GET == Resp..."
 
Tracy (talk | contribs)
No edit summary
Line 1: Line 1:
<translate>
<translate>
= Get subscription data =
= Get Subscription Data =
Gets statistics data of an active subscription.
This method gets the statistics data of an active subscription.


== URI ==
== URI ==
https://{host:port}/statsapi/subscription/data
https://{host:port}/statsapi/subscription/data


== HTTP Method ==
== HTTP Method ==
Line 10: Line 10:


== Response ==
== Response ==
*401 Unauthorized
{|border="1" style="border-collapse:collapse" cellpadding="5"
*404 Bad Request (There is no active subscription)
| '''Code'''
*204 –No Content (Data is not ready yet)  
| '''Description'''
*200 OK  
|-
| 401
| Unauthorized
|-
| 404
| Bad request (there is no active subscription)
|-
| 204
| No content (data is not ready yet)  
|-
| 200
| OK
|}


=== Example ===
  {
  {
     {
     {

Revision as of 23:52, 27 August 2018

<translate>

Get Subscription Data

This method gets the statistics data of an active subscription.

URI

https://{host:port}/statsapi/subscription/data

HTTP Method

GET

Response

Code Description
401 Unauthorized
404 Bad request (there is no active subscription)
204 No content (data is not ready yet)
200 OK

Example

{
    {
        "<app id>": {
        "stats_totals": {//array of single statistics
        "<statistic name>": <statistic value>
    }, 
    "service_grids": [//array of service grids 
        {
            "id": "<grid Id>",
            "values": [
                {
                    "<column id>": "<statistic value>"
                }
            ]
        }
    ],
    "agent_grids": [ //array of agent grids 
        {
            "id": "<grid Id>",
            "values": [
                {
                    "<column id>": "<statistic value>"
                }
            ]
        }
    ],
    "chat_messages": [
        {
            "id": "<message id>",
            "login_id": "<sender loginId>",
            "first_name": "<sender first name>",
            "last_name": "<sender last name>",
            "send_time": "<utc timestamp>",
            "is_urgent": "1|0",
            "content": "<chat message>"
        }
    ]
    }
}



</translate>