{"info":{"_postman_id":"8df96bf9-38dd-43dc-9f75-80c731e15855","name":"BPCC Real-Time Statistics API","description":"<html><head></head><body><p>With the Bright Pattern Contact Center Real-Time Statistics API, you can currently do the following:</p>\n<ul>\n<li>Create and manage a real-time statistics subcription</li>\n<li>Retrieve dispositions</li>\n<li>See if agents are available for a specified service</li>\n</ul>\n<p>Notes: </p>\n<ul>\n<li>Users attempting to use this API must have the <a href=\"https://help.brightpattern.com/5.3:Contact-center-administrator-guide/Privileges\">privileges</a> \"Access Realtime Stats API\", \"View real-time agent metrics\", and \"View real-time service metrics\" enabled, as well as be the assigned supervisor for the corresponding <a href=\"https://help.brightpattern.com/5.3:Contact-center-administrator-guide/Teams\">teams</a>.</li>\n<li>For a list of statistics to use, please see <a href=\"https://help.brightpattern.com/5.3:Real-time-statistics-api/ListofStatistics\">Bright Pattern Contact Center Help Documentation</a>.</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"6735878","collectionId":"8df96bf9-38dd-43dc-9f75-80c731e15855","publishedId":"T1DwbtSk","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-08-03T22:16:58.000Z"},"item":[{"name":"Authentication","item":[{"name":"Get Access Token","id":"2cfd5401-09b0-48f6-813b-a21f93d06584","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","type":"text","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"description":"<p><a href=\"https://help.brightpattern.com/5.3:Contact-center-administrator-guide/Users#Username\">Username</a> of a Bright Pattern user authorized to <a href=\"https://help.brightpattern.com/5.3:Contact-center-administrator-guide/UsersandTeams/Privileges#Access_Real-time_Stats_API\">access the Real-time Stats API</a>, <a href=\"https://help.brightpattern.com/5.3:Contact-center-administrator-guide/UsersandTeams/Privileges#View_real-time_agent_metrics\">View real-time agent metrics</a>, and <a href=\"https://help.brightpattern.com/5.3:Contact-center-administrator-guide/UsersandTeams/Privileges#View_real-time_service_metrics\">View real-time service metrics</a></p>\n","key":"client_id","type":"text","value":""},{"description":"<p><a href=\"https://help.brightpattern.com/5.3:Contact-center-administrator-guide/UsersandTeams/Users#API_secret\">API secret key</a> generated for the above user</p>\n","key":"client_secret","type":"text","value":""},{"description":"<p>Your contact center URL (e.g., <em>yourcompany.brightpattern.com</em>)</p>\n","key":"scope","type":"text","value":""},{"description":"<p>Grant type; must be set to <em>client_credentials</em></p>\n","key":"grant_type","type":"text","value":""}]},"url":"https://<tenant_URL>/configapi/v2/oauth/token","description":"<p>Returns an access token that will be used to authenticate each subsequent request made via this API.</p>\n","urlObject":{"protocol":"https","path":["configapi","v2","oauth","token"],"host":["<tenant_URL>"],"query":[],"variable":[]}},"response":[{"id":"6c68b6d4-27db-474d-8a13-a6b1da662d59","name":"Get Access Token","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"client_id","value":"some.user","type":"text"},{"key":"client_secret","value":"FHjeyOt6LWS7jMvNb6tcjyuU3KDYlG2NjeI6vJBLV72VnLrwexA3imSkkQjSwLuv","type":"text"},{"key":"scope","value":"yourcompany.brightpattern.com","type":"text"},{"key":"grant_type","value":"client_credentials","type":"text"}]},"url":"https://<tenant_URL>/configapi/v2/oauth/token"},"_postman_previewlanguage":"Text","header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"access_token\": \"15490315E83EBC929978DB0AE84D0AC63F0DC38AAB701A949FDEF6054E4A1AF9\",\r\n    \"token_type\": \"Bearer\",\r\n    \"expires_in\": \"3600\",\r\n    \"scope\": \"yourcompany.brightpattern.com\"\r\n}"}],"_postman_id":"2cfd5401-09b0-48f6-813b-a21f93d06584"},{"name":"Authenticate","id":"2e6eeb2e-4f9d-4412-8e40-f708d9d22c46","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"tenant_url\" : \"<tenant_url>\",\r\n    \"username\" : \"<username>\",\r\n    \"password\" : \"<password>\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://<tenant_URL>/statsapi/auth","description":"<p>This method authenticates a user on a server. In the case of successful authentication, the server sets session cookies.</p>\n<h2 id=\"response-codes\">Response Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Code</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["statsapi","auth"],"host":["<tenant_URL>"],"query":[],"variable":[]}},"response":[{"id":"53a7198d-0378-4e39-9079-f524aa66d380","name":"Authenticate","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"tenant_url\" : \"yourcompany.brightpattern.com\",\r\n    \"username\" : \"stats.user\",\r\n    \"password\" : \"SecurePassword!\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://yourcompany.brightpattern.com/statsapi/auth"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"token\": \"61XXXXX2-XEX5-4XBX-81C3-14CXXXXXX721\",\r\n    \"privileges\": [\r\n        \"PUSH_PULL_GLOBAL_WALLBOARDS\",\r\n        \"CUSTOMIZE_WALLBOARDS\",\r\n        \"SYS_USE_AGENT_SEAT_MAPS\"\r\n    ],\r\n    \"user_id\": \"XXXC49E4-E9XX-4XFX-X4X4-62XXXXXXXX8E\"\r\n}"}],"_postman_id":"2e6eeb2e-4f9d-4412-8e40-f708d9d22c46"}],"id":"c6220bcc-7bf9-4b21-9357-e1c146b53578","description":"<p>This API supports two forms of authentication: OAuth 2.0 and Basic</p>\n<h2 id=\"oauth-20-authentication\">OAuth 2.0 Authentication</h2>\n<p>The <a href=\"https://tools.ietf.org/html/rfc6749#section-4.4\">OAuth 2.0 Client Credentials Grant</a> is used to authenticate clients of this API, using the <strong>Get Access Token</strong> method. The authenticated user is checked for having appropriate privileges to perform the requested operation. The complete list of privileges can be found <a href=\"https://help.brightpattern.com/5.3:Contact-center-administrator-guide/Privileges\">here</a>. Privileges are assigned to users via one or more <a href=\"https://help.brightpattern.com/5.3:Contact-center-administrator-guide/Roles\">Roles</a>.</p>\n<p>To obtain an access token:</p>\n<ol>\n<li>Login to your BPCC configuration portal.</li>\n<li>Navigate to the <a href=\"https://help.brightpattern.com/5.3:Contact-center-administrator-guide/Users\">Users</a> page.</li>\n<li>Select or create a user; the user must:<ol>\n<li>Have the following privileges:</li>\n<li><em>Access Realtime Stats API</em></li>\n<li><em>View real-time agent metrics</em></li>\n<li><em>View real-time service metrics</em></li>\n<li>Be assigned as a team supervisor (i.e., they will get metrics for agents of this team and services handled by this team)</li>\n</ol>\n</li>\n<li>Click the <strong>Generate</strong> button to generate an <a href=\"https://help.brightpattern.com/5.3:Contact-center-administrator-guide/UsersandTeams/Users#API_secret\">API secret key</a>. Copy the generated key and note the username for the next steps.<br />Use the <em>Get Access Token</em> method to obtain an access token. Set the <em>client_id</em> to the above username and the <em>client_secret</em> to the generated API secret key.<br />Use the value of <em>access_token</em> returned in the response to set the <em>Authorization: Bearer [access token]</em> header of each subsequent request made via the BPCC Real-Time Stats API.</li>\n</ol>\n<p><strong>Notes</strong>:<br />This method of authentication may be used starting from Bright Pattern Contact Center version 5.5.5.</p>\n<h2 id=\"basic-authentication\">Basic Authentication</h2>\n<p>Basic authentication authenticates a user on a server using the <strong>Authenticate</strong> method. In the case of successful authentication, the server sets session cookies.</p>\n<h2 id=\"how-to-use\">How to Use</h2>\n<p>For both authentication methods, a successful response contains a <strong>token</strong>. When making any other requests with methods from this API, you will include the token in the corresponding header type.</p>\n<p>When using the <strong>Authenticate</strong> method, the token will be included in a <strong>Cookie</strong> header; structure is as follows:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Cookie:X-STATSAPI-TOKEN=61XXXXX2-XEX5-4XBX-81C3-14CXXXXXX721; X-STATSAPI-TENANT=tenant_URL; X-STATSAPI-LOGIN=user.name\n\n</code></pre><p>Note that the cookie is valid until the next user logs into any wallboard (i.e., one cookie per user).</p>\n<p>When using the <strong>Get Access Token</strong> method, the token will be included in a <strong>Authorization</strong> header; the structure is as follows:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer &lt;access_token&gt;\n</code></pre>","event":[{"listen":"prerequest","script":{"id":"834d2616-f89a-4290-8e0a-11f6e1962b95","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"c6dcf48a-6977-49df-9b98-1e4d0b4dbd49","type":"text/javascript","exec":[""]}}],"_postman_id":"c6220bcc-7bf9-4b21-9357-e1c146b53578"},{"name":"Methods","item":[{"name":"Create Subscription","id":"9deb0657-9bc5-400c-8873-ca7ee5689a96","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Authorization","value":"Bearer <access_token>","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"<app id>\": {\r\n        \"stats_totals\": [\"statistic name\" ], //array of statistics\r\n        \"service_grids\": [//array of service grid definitions \r\n            {\r\n                \"id\": \"<grid Id>\",\r\n                \"columns\": [//array of stats for columns\r\n                    {\r\n                        \"id\": \"<column id>\",\r\n                        \"stat_name\": \"<statistic protocol name>\"\r\n                    }\r\n                ], \r\n                \"order_by\": \"<column id>\",\r\n                \"order_dir\": \"ASC|DESC\",\r\n                \"limit\": \"<count of top records>\",\r\n                \"filter_by\": \"<column id>\",\r\n                \"filter_value\": \"<value>\",\r\n                \"filter_operation\": \"EQ|NE|LT|GT|LE|GE\"\r\n            }\r\n        ],\r\n        \"agent_grids\": [ //array of agent grid definitions  \r\n            {\r\n                \"id\": \"<grid Id>\",\r\n                \"columns\": [//array of stats for columns\r\n                    {\r\n                        \"id\": \"<column id>\",\r\n                        \"stat_name\": \"<statistic protocol name>\", \r\n                        \"dispositions\": [\"<(optional)list of dispositions>\"]\r\n                    }\r\n                ], \r\n                \"order_by\": \"<column id>\",\r\n                \"order_dir\": \"ASC|DESC\",\r\n                \"limit\": \"<count of top records>\",\r\n                \"filter_by\": \"<column id>\",\r\n                \"filter_value\": \"<value>\",\r\n                \"filter_operation\": \"EQ|NE|LT|GT|LE|GE\"\r\n            }\r\n        ],\r\n        \"chat_messages\": {//top of internal chat messages  \r\n        \"filter\": \"<filter by message content>\",\r\n        \"limit\": \"<count of top records>\"\r\n        }\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"https://<tenant_URL>/statsapi/subscription","description":"<p>This method creates a subscription for a specific set of metrics. Each client can have only one active subscription.</p>\n<h2 id=\"response-codes\">Response Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Code</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK subscription was created</td>\n</tr>\n<tr>\n<td>400</td>\n<td>Bad request</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n</tr>\n<tr>\n<td>409</td>\n<td>Limit of active subscriptions exceeded for tenant</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["statsapi","subscription"],"host":["<tenant_URL>"],"query":[],"variable":[]}},"response":[{"id":"006fab4a-8fd9-4f6c-9ab2-2fe84cc525b3","name":"Create Subscription","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"61XXXXX2-XEX5-4XBX-81C3-14CXXXXXX721","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"1\": {\r\n        \"agent_grids\": [\r\n            {\r\n                \"id\": \"1\",\r\n                \"team_ids\": [\r\n                    \"F4ED90FA-5A49-4D76-9487-4E41B24CA45F\"\r\n                ],\r\n                \"limit\": 1000,\r\n                \"columns\": [\r\n                    {\r\n                        \"id\": \"1\",\r\n                        \"statName\": \"first_last_name\"\r\n                    },\r\n                    {\r\n                        \"id\": \"2\",\r\n                        \"statName\": \"extension\"\r\n                    },\r\n                    {\r\n                        \"id\": \"3\",\r\n                        \"statName\": \"acd_next_state\"\r\n                    },\r\n                    {\r\n                        \"id\": \"4\",\r\n                        \"statName\": \"login_time\"\r\n                    },\r\n                    {\r\n                        \"id\": 5,\r\n                        \"statName\": \"acd_state\"\r\n                    }\r\n                ],\r\n                \"order\": [\r\n                    {\r\n                        \"by\": \"1\",\r\n                        \"dir\": \"DESC\"\r\n                    }\r\n                ],\r\n                \"service_ids\": [],\r\n                \"my_subteam_only\": false,\r\n                \"logged_in_agents_only\": false\r\n            }\r\n        ]\r\n    },\r\n    \"2\": {\r\n        \"stats_totals\": [\r\n            \"in_calls_waiting\"\r\n        ],\r\n        \"stats_totals_service_ids\": [\r\n            \"E66F7A0C-E464-4656-B4AA-026F53A3D403\",\r\n            \"A2B6564D-C7FE-4086-A6CE-AE91C7A3A3D5\",\r\n            \"DF46C874-112D-499A-8744-407E06E4BF71\",\r\n            \"8E9042CF-C414-4749-910D-CC115498EFD2\"\r\n        ],\r\n        \"stats_totals_dispositions\": []\r\n    },\r\n    \"3\": {\r\n        \"stats_totals\": [\r\n            \"in_average_speed_of_answer\"\r\n        ],\r\n        \"stats_totals_service_ids\": [\r\n            \"E66F7A0C-E464-4656-B4AA-026F53A3D403\",\r\n            \"A2B6564D-C7FE-4086-A6CE-AE91C7A3A3D5\",\r\n            \"DF46C874-112D-499A-8744-407E06E4BF71\",\r\n            \"8E9042CF-C414-4749-910D-CC115498EFD2\"\r\n        ],\r\n        \"stats_totals_dispositions\": []\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"https://yourcompany.brightpattern.com/statsapi/subscription"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"9deb0657-9bc5-400c-8873-ca7ee5689a96"},{"name":"Get Subscription Data","id":"854e413e-1210-47b4-8366-092b25bc6290","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Bearer <access_token>","type":"text"}],"url":"https://<tenant_URL>/statsapi/subscription/data","description":"<p>This method gets the statistics data of an active subscription.</p>\n<p>Note:</p>\n<ul>\n<li>Your user must be the supervisor of a team in order to retrieve agent_grid information.</li>\n</ul>\n<h2 id=\"response-codes\">Response Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Code</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n</tr>\n<tr>\n<td>204</td>\n<td>No content (data is not ready yet)</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n</tr>\n<tr>\n<td>404</td>\n<td>Bad request (there is no active subscription)</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["statsapi","subscription","data"],"host":["<tenant_URL>"],"query":[],"variable":[]}},"response":[{"id":"df07a334-2084-4546-81b1-7587cba8f5ce","name":"Get Subscription Data","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"61XXXXX2-XEX5-4XBX-81C3-14CXXXXXX721","type":"text"}],"url":"https://yourcompany.brightpattern.com/statsapi/subscription/data"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"example.subscription.string\": {\r\n        \"agent_grids\": [\r\n            {\r\n                \"id\": \"example.agent.grid\",\r\n                \"values\": [\r\n                    {\r\n                        \"1\": \"christy.borden\",\r\n                        \"2\": \"0\"\r\n                    },\r\n                    {\r\n                        \"1\": \"marky.mark\",\r\n                        \"2\": \"0\"\r\n                    },\r\n                    {\r\n                        \"1\": \"allen.fawcett\",\r\n                        \"2\": \"0\"\r\n                    },\r\n                    {\r\n                        \"1\": \"jeffery.lozada\",\r\n                        \"2\": \"0\"\r\n                    },\r\n                    {\r\n                        \"1\": \"liza.smith\",\r\n                        \"2\": \"1\"\r\n                    }\r\n                ]\r\n            }\r\n        ],\r\n        \"service_grids\": [\r\n            {\r\n                \"id\": \"example.service.grid\",\r\n                \"values\": [\r\n                    {\r\n                        \"1\": \"Chat Service\",\r\n                        \"2\": \"2\"\r\n                    },\r\n                    {\r\n                        \"1\": \"1\",\r\n                        \"2\": \"1\"\r\n                    },\r\n                    {\r\n                        \"1\": \"Outbound Voice\",\r\n                        \"2\": \"2\"\r\n                    },\r\n                    {\r\n                        \"1\": \"3\",\r\n                        \"2\": \"1\"\r\n                    },\r\n                    {\r\n                        \"1\": \"Best Chat Service\",\r\n                        \"2\": \"1\"\r\n                    },\r\n                    {\r\n                        \"1\": \"Voice Inbound\",\r\n                        \"2\": \"2\"\r\n                    },\r\n                    {\r\n                        \"1\": \"Support for CSIM\",\r\n                        \"2\": \"2\"\r\n                    },\r\n                    {\r\n                        \"1\": \"Email Svc\",\r\n                        \"2\": \"2\"\r\n                    },\r\n                    {\r\n                        \"1\": \"Nice Inbound\",\r\n                        \"2\": \"1\"\r\n                    },\r\n                    {\r\n                        \"1\": \"2\",\r\n                        \"2\": \"1\"\r\n                    }\r\n                ]\r\n            }\r\n        ],\r\n        \"stats_totals\": {\r\n            \"agents_logged\": \"2\",\r\n            \"in_average_speed_of_answer\": \"\",\r\n            \"agents_ready\": \"2\"\r\n        },\r\n        \"chat_messages\": []\r\n    }\r\n}"}],"_postman_id":"854e413e-1210-47b4-8366-092b25bc6290"},{"name":"Delete Subscription","id":"1523d83e-783a-4629-af6c-fe5dc36aa61d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"DELETE","header":[{"key":"Authorization","value":"Bearer <access_token>","type":"text"}],"url":"https://<tenant_URL>/statsapi/subscription/active","description":"<p>This method deletes the active subscription, and clears the data cache on the server.</p>\n","urlObject":{"protocol":"https","path":["statsapi","subscription","active"],"host":["<tenant_URL>"],"query":[],"variable":[]}},"response":[{"id":"dd0b85e2-77da-40b2-925e-314062b0896f","name":"Delete Subscription","originalRequest":{"method":"DELETE","header":[{"key":"Authorization","value":"61XXXXX2-XEX5-4XBX-81C3-14CXXXXXX721","type":"text"}],"url":"https://yourcompany.brightpattern.com/subscription/active"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"1523d83e-783a-4629-af6c-fe5dc36aa61d"},{"name":"Get Dispositions","id":"20f974af-1817-4f4e-9376-0b1d5bf28a78","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Bearer <access_token>","type":"text"}],"url":"https://<tenant_URL>/statsapi/cfg/dispositions","description":"<p>This method gets the disposition names for all supervised services.</p>\n<h2 id=\"optional-url-parameters\">Optional URL Parameters</h2>\n<ul>\n<li>agentCanSelect = 1</li>\n<li>inbound = 1 </li>\n<li>outbound = 1</li>\n<li>preview = 1</li>\n</ul>\n<h2 id=\"response-codes\">Response Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Code</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["statsapi","cfg","dispositions"],"host":["<tenant_URL>"],"query":[],"variable":[]}},"response":[{"id":"ebfd8470-d3c2-4e27-81ec-618bfae30bdb","name":"Get Dispositions","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"61XXXXX2-XEX5-4XBX-81C3-14CXXXXXX721","type":"text"}],"url":{"raw":"https://yourcompany.brightpattern.com/statsapi/cfg/dispositions?inbound=1","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["statsapi","cfg","dispositions"],"query":[{"key":"inbound","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":null,"cookie":[],"responseTime":null,"body":"[\r\n    \"Agent failure\",\r\n    \"Disposition not found\",\r\n    \"Dropped while talking\",\r\n    \"Offer rejected\",\r\n    \"Phone number out of service\",\r\n    \"Product sold\",\r\n    \"Silence\",\r\n    \"System failure\",\r\n    \"Wrong number\"\r\n]"}],"_postman_id":"20f974af-1817-4f4e-9376-0b1d5bf28a78"},{"name":"Get Available Agents","id":"802da9d4-7c4b-4071-af93-1ecf94628560","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"https://<tenant_URL>/statsapi/info/check_available_agents?service={service-name}","description":"<p>This method gets either the \"true\" or the \"false\" value for agents ready to handle a specific service.</p>\n<p>Note:</p>\n<ul>\n<li>No authentication or subscription is needed for this method.</li>\n</ul>\n<h2 id=\"response\">Response</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Code</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n</tr>\n<tr>\n<td>True</td>\n<td>\"Number of ready agents\" &gt; 0 for the specific service (i.e., at least one agent is available)</td>\n</tr>\n<tr>\n<td>False</td>\n<td>\"Number of ready agents\" is 0 for the specific service (i.e., no agent is available)</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["statsapi","info","check_available_agents"],"host":["<tenant_URL>"],"query":[{"key":"service","value":"{service-name}"}],"variable":[]}},"response":[{"id":"96e9f844-c635-4054-b5f6-418441d3e56e","name":"Get Available Agents","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://yourcompany.brightpattern.com/statsapi/info/check_available_agents?service=inbound","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["statsapi","info","check_available_agents"],"query":[{"key":"service","value":"inbound"}]}},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"availability\": true\r\n}"}],"_postman_id":"802da9d4-7c4b-4071-af93-1ecf94628560"},{"name":"Get Teams","id":"bcf7c919-7b40-4c17-bf64-b374769bdc5e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Bearer <access_token>","type":"text"}],"url":"https://<tenant_URL>/statsapi/cfg/teams","description":"<p>This method returns the names and internal object IDs of teams configured for the given tenant.</p>\n<p>Note that in order to get the above information about a specific team, the account used for <a href=\"https://help.brightpattern.com/5.8:Contact-center-administrator-guide/UsersandTeams/Users#API_secret\">API authentication</a> must be assigned as a supervisor to that team.</p>\n","urlObject":{"protocol":"https","path":["statsapi","cfg","teams"],"host":["<tenant_URL>"],"query":[],"variable":[]}},"response":[{"id":"39c12abf-9f84-43f3-a013-df38c2e609ec","name":"Get Teams","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"{{vault:bearer-token}}","type":"text"}],"url":"https://yourcompany.brightpattern.com/statsapi/cfg/teams"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[""],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"[\n    {\n        \"id\": \"F4ED90FA-5A49-4D76-9487-4E41B24CA45F\",\n        \"name\": \"Customer Service\"\n    }\n]"}],"_postman_id":"bcf7c919-7b40-4c17-bf64-b374769bdc5e"}],"id":"cd65d7a9-61c6-4ec5-a76b-af429452bb50","description":"<p>The Bright Pattern Contact Center Real-Time Statistics API methods are as follows.</p>\n<p>Note:</p>\n<ul>\n<li>For a list of statistics to use, please see <a href=\"https://help.brightpattern.com/5.3:Real-time-statistics-api/ListofStatistics\">Bright Pattern Contact Center Help Documentation</a>.</li>\n</ul>\n","event":[{"listen":"prerequest","script":{"id":"b0474593-1e04-40e9-a148-57acc60724e2","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"3cc2ad67-8234-4007-8ac8-b451c11dc615","type":"text/javascript","exec":[""]}}],"_postman_id":"cd65d7a9-61c6-4ec5-a76b-af429452bb50"}],"event":[{"listen":"prerequest","script":{"id":"b46e3bf5-2de2-4a6e-baff-5f136d8d3c42","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"b7160178-c0e8-43a3-a332-868785e508c8","type":"text/javascript","exec":[""]}}]}