openapi: 3.0.1 info: title: chatstatus.php description: chatstatus PHP API - can be used to enable a Cisco ECE WebChat to be opened, closed or busy based on opening hours (using Cisco CCE Business Hours and Agent Availability, Queue Depth and Wait Time - using the Cisco ECE APIs) version: '3.4' servers: - url: https://chatapi.example.com paths: /api/chatstatus.php: get: description: chatstatus API parameters: - name: businessHoursId in: query schema: type: integer example: '5000' - name: chatEntryId in: query schema: type: integer example: '1001' responses: '200': description: Auto generated using Swagger Inspector content: application/json: schema: type: object properties: chatStatus: type: string errorString: type: string errorCode: type: integer chatStatusReason: type: string cacheEngine: type: string chatTimer: type: integer debugLevel: type: integer examples: 'open': # 'open' example value: >- {"chatStatus":"open","chatStatusReason":"","chatTimer":10000,"errorCode":0,"errorString":"","debugLevel":0,"cacheEngine":"Redis"} 'busy - agent availability': # 'busy' example - chatStatusReason of 'MinAgentCount' value: >- {"chatStatus":"busy","chatStatusReason":"MinAgentCount","chatTimer":0,"errorCode":0,"errorString":"","debugLevel":0,"cacheEngine":"Redis"} 'closed - standard - reason: "week day closed"': value: >- {"chatStatus":"closed","chatStatusReason":"Week Day closed reason","chatTimer":0,"errorCode":0,"errorString":"","debugLevel":0,"cacheEngine":"Redis"} 'closed - reason: "Holiday"': value: >- {"chatStatus":"closed","chatStatusReason":"Holiday","chatTimer":0,"errorCode":0,"errorString":"","debugLevel":0,"cacheEngine":"Redis"} 'debugLevel "1" example - busy': # same output as debug 0 - but browser should log output to the console value: >- {"chatStatus":"busy","chatStatusReason":"MinAgentCount","chatTimer":0,"errorCode":0,"errorString":"","debugLevel":1,"cacheEngine":"Redis"} 'debugLevel "2" example - busy': # same output as debug 0 - but browser should log output to the console value: >- {"chatStatus":"busy","chatStatusReason":"MinAgentCount","chatTimer":0,"errorCode":0,"errorString":"","debugLevel":2,"cacheEngine":"Redis","cceBusinessHoursAPI":"From Source","eceCapacityAPI":"From Source","eceLiveSessionAPI":""} 'debugLevel "3" example - busy': # same output as debug 0 - but browser should log output to the console value: >- {"chatStatus":"busy","chatStatusReason":"MinAgentCount","chatTimer":0,"errorCode":0,"errorString":"","debugLevel":3,"cacheEngine":"Redis","cceBusinessHoursAPI":"From Source","eceCapacityAPI":"From Source","eceLiveSessionAPI":"","cceBusinessHoursObj":{"API":"cceBusinessHours","Name":"eirSupportChat_10_1_5_60","Status":"open","runTimeStatusReason":"Week Day open reason","ChatTimer":10000,"MinAgentCount":1,"MaxQueueDepth":5,"MaxWaitTime":60,"errorcode":0,"errorstring":"","httpcode":200,"runTimeStatus":1,"cache":false},"eceCapacityObj":{"API":"eceCapacity","Status":"busy","BusyReason":"MinAgentCount","MinAgentCount":1,"errorcode":0,"errorstring":"","httpcode":200,"AgentCount":0,"cache":false},"eceLiveSessionObj":null} 'debugLevel "3" example - open': # same output as debug 0 - but browser should log output to the console value: >- {"chatStatus":"open","chatStatusReason":"","chatTimer":10000,"errorCode":0,"errorString":"","debugLevel":3,"cacheEngine":"Redis","cceBusinessHoursAPI":"From Cache","eceCapacityAPI":"From Cache","eceLiveSessionAPI":"From Cache","cceBusinessHoursObj":{"API":"cceBusinessHours","Name":"eirSupportChat_10_1_5_60","Status":"open","runTimeStatusReason":"Week Day open reason","ChatTimer":10000,"MinAgentCount":1,"MaxQueueDepth":5,"MaxWaitTime":60,"errorcode":0,"errorstring":"","httpcode":200,"runTimeStatus":1,"cache":true},"eceCapacityObj":{"API":"eceCapacity","Status":"open","BusyReason":"","MinAgentCount":1,"errorcode":0,"errorstring":"","httpcode":200,"AgentCount":1,"cache":true},"eceLiveSessionObj":{"API":"eceLiveSession","Status":"open","BusyReason":"","errorcode":0,"errorstring":"","httpcode":200,"MaxQueueDepth":5,"MaxWaitTime":60,"queueDepth":0,"waitTime":6,"cache":true}} '404': description: client error - businessHoursId does not exist content: application/json: schema: type: object properties: debuglevel: type: integer chatStatusReason: type: string chatstatus: type: string chatTimer: type: string errorcode: type: integer errorstring: type: string examples: 'invalid businessHoursId': value: >- {"chatStatus":"closed","chatStatusReason":"out of service","chatTimer":0,"errorCode":404,"errorString":"CCE BusinessHours HTTP Error.","debugLevel":0,"cacheEngine":"Redis"} '406': description: client error - missing or invalid parameters content: application/json: schema: type: object properties: debuglevel: type: integer chatStatusReason: type: string chatstatus: type: string chatTimer: type: string errorcode: type: integer errorstring: type: string examples: 'businessHoursId Not set': value: >- {"chatstatus":"closed","chatStatusReason":"out of service","chatTimer":"0","errorcode":406,"errorstring":"businessHoursId not set.","debuglevel":0} 'chatEntryId Not set': value: >- {"chatstatus":"closed","chatStatusReason":"out of service","chatTimer":"0","errorcode":406,"errorstring":"chatEntryId not set.","debuglevel":0} '500': description: server error content: application/json: schema: type: object properties: debuglevel: type: integer chatStatusReason: type: string chatstatus: type: string chatTimer: type: string errorcode: type: integer errorstring: type: string examples: 'Redis - Out of Service': value: >- {"chatstatus":"closed","chatStatusReason":"out of service","chatTimer":0,"errorcode":500,"errorstring":"Redis Connection Error.","debuglevel":0} 'ECE - WebServer Out of Service': value: >- {"chatStatus":"closed","chatStatusReason":"out of service","chatTimer":0,"errorCode":500,"errorString":"ECE Capacity HTTP Error.","debugLevel":0,"cacheEngine":"Redis"} '503': description: server error content: application/json: schema: type: object properties: debuglevel: type: integer chatStatusReason: type: string chatstatus: type: string chatTimer: type: string errorcode: type: integer errorstring: type: string examples: 'CCE Business Hours API Server - Out of Service': value: >- {"chatStatus":"closed","chatStatusReason":"out of service","chatTimer":0,"errorCode":503,"errorString":"CCE BusinessHours HTTP Error.","debugLevel":0,"cacheEngine":"Redis"}