XAPI - Queues

telis

Premier Customer
Advanced Certified
Joined
Aug 13, 2007
Messages
238
Reaction score
65
What can I put in the expand argument in the query string for the 3CX XAPI Configuration API. I figured out by guesswork that I have to use "agents" to get the members of the queues but I cannot figure out how to get the DD for the queue or what else might be available.

/xapi/v1/Queues?expand=agents

Is this documented anywhere or does anyone have any knowledge?
 
Hello


The full detail should be: (*see below)
If any detail is missing in your result, you can expand... like Agents, Groups, Managers,..


JSON:
{
  "@odata.count": "<long>",
  "value": [
    {
      "AgentAvailabilityMode": "<boolean>",
      "Agents": [
      ],
      "AnnouncementInterval": "<integer>",
      "AnnounceQueuePosition": "<boolean>",
      "BreakRoute": {
        "IsPromptEnabled": "<boolean>",
        "Prompt": "<string>",
        "Route": {
          "External": "<string>",
          "Name": "<string>",
          "Number": "<string>",
          "PeerType": "IVR",
          "To": "None"
        }
      },
      "CallbackEnableTime": "<integer>",
      "CallbackPrefix": "<string>",
      "CallUsEnableChat": "<boolean>",
      "CallUsEnablePhone": "<boolean>",
      "CallUsEnableVideo": "<boolean>",
      "CallUsRequirement": "Email",
      "ClickToCallId": "<string>",
      "EnableIntro": "<boolean>",
      "ForwardNoAnswer": {
        "External": "<string>",
        "Name": "<string>",
        "Number": "<string>",
        "PeerType": "Parking",
        "To": "IVR"
      },
      "Groups": [
      ],
      "MasterTimeout": "<integer>",
      "MaxCallersInQueue": "<integer>",
      "Name": "<string>",
      "NotifyCodes": [
      ],
      "Number": "<string>",
      "OfficeRoute": {
        "IsPromptEnabled": "<boolean>",
        "Prompt": "<string>",
        "Route": {
          "External": "<string>",
          "Name": "<string>",
          "Number": "<string>",
          "PeerType": "RoutePoint",
          "To": "None"
        }
      },
      "OnHoldFile": "<string>",
      "OutOfOfficeRoute": {
        "IsPromptEnabled": "<boolean>",
        "Prompt": "<string>",
        "Route": {
          "External": "<string>",
          "Name": "<string>",
          "Number": "<string>",
          "PeerType": "ExternalLine",
          "To": "VoiceMail"
        }
      },
      "PlayFullPrompt": "<boolean>",
      "PollingStrategy": "SkillBasedRouting_RingAll",
      "PriorityQueue": "<boolean>",
      "PromptSet": "<string>",
      "Recording": "AllowToOptOut",
      "ResetQueueStatisticsSchedule": {
        "Day": "Monday",
        "Frequency": "Weekly",
        "Time": "13:29:59.3"
      },
      "ResetStatisticsScheduleEnabled": "<boolean>",
      "RingTimeout": "<integer>",
      "SLATime": "<integer>",
      "TypeOfChatOwnershipType": "TakeManually",
      "WrapUpTime": "<integer>"
    },
    {
      "AgentAvailabilityMode": "<boolean>",
      "Agents": [
      ],
      "AnnouncementInterval": "<integer>",
      "AnnounceQueuePosition": "<boolean>",
      "BreakRoute": {
        "IsPromptEnabled": "<boolean>",
        "Prompt": "<string>",
        "Route": {
          "External": "<string>",
          "Name": "<string>",
          "Number": "<string>",
          "PeerType": "IVR",
          "To": "VoiceMailOfDestination"
        }
      },
      "CallbackEnableTime": "<integer>",
      "CallbackPrefix": "<string>",
      "CallUsEnableChat": "<boolean>",
      "CallUsEnablePhone": "<boolean>",
      "CallUsEnableVideo": "<boolean>",
      "CallUsRequirement": "Email",
      "ClickToCallId": "<string>",
      "EnableIntro": "<boolean>",
      "ForwardNoAnswer": {
        "External": "<string>",
        "Name": "<string>",
        "Number": "<string>",
        "PeerType": "SpecialMenu",
        "To": "None"
      },
      "Groups": [
      ],
      "HolidaysRoute": {
        "IsPromptEnabled": "<boolean>",
        "Prompt": "<string>",
        "Route": {
          "External": "<string>",
          "Name": "<string>",
          "Number": "<string>",
          "PeerType": "SpecialMenu",
          "To": "Boomerang"
        }
      },
      "Id": "<integer>",
      "IntroFile": "<string>",
      "IsRegistered": "<boolean>",
      "Managers": [
      ],
      "MasterTimeout": "<integer>",
      "MaxCallersInQueue": "<integer>",
      "Name": "<string>",
      "NotifyCodes": [
      ],
      "Number": "<string>",
      "OfficeRoute": {
        "IsPromptEnabled": "<boolean>",
        "Prompt": "<string>",
        "Route": {
          "External": "<string>",
          "Name": "<string>",
          "Number": "<string>",
          "PeerType": "ExternalLine",
          "To": "Deflect"
        }
      },
      "OnHoldFile": "<string>",
      "OutOfOfficeRoute": {
        "IsPromptEnabled": "<boolean>",
        "Prompt": "<string>",
        "Route": {
          "External": "<string>",
          "Name": "<string>",
          "Number": "<string>",
          "PeerType": "Group",
          "To": "Boomerang"
        }
      },
      "PlayFullPrompt": "<boolean>",
      "PollingStrategy": "First3Available",
      "PriorityQueue": "<boolean>",
      "PromptSet": "<string>",
      "Recording": "Disabled",
      "ResetQueueStatisticsSchedule": {
        "Day": "Wednesday",
        "Frequency": "Weekly",
        "Time": "21:49:43"
      },
      "ResetStatisticsScheduleEnabled": "<boolean>",
      "RingTimeout": "<integer>",
      "SLATime": "<integer>",
      "TypeOfChatOwnershipType": "TakeManually",
      "WrapUpTime": "<integer>"
    }
  ]
}


Hope this helps.

Paulo
 
  • Like
Reactions: fxbastler
... but I cannot figure out how to get the DD for the queue or what else might be available.
The DID of a queue cannot be obtained with the XAPI query of the queue alone. It can only be determined by combining it with a query of the inbound rules and their assignment to the queue’s ID.
 
  • Like
Reactions: paulodagraca
Hello telis,

If you want the Queue DID, you could be doing something like this in your programm/script:

GET
.../xapi/v1/ReportInboundRules/Pbx.GetInboundRulesData()?%24top=100&%24skip=0

Find match of Queue number
"value" [ ] "InOfficeRouting" "Number"

If found, grab DID
"value" [ ] "DID"

Paulo
 
Many thanks both.

@paulodagraca where did you get this json from? When I called the endpoint without expand specified I do not see an empty Agents, Groups node etc. so I didn't know what the full list of options for the expand argument was. And I still don't know what it is for the other calls that have an expand property.

@fxbastler I have used now used the inbound rules call to get the data I needed after typing several things into the expand property of the queues call and not getting anywhere.
 
  • Like
Reactions: fxbastler
Hello telis,

I was looking into Postman with the 3CX workspace.

1762340626011.png

Paulo
 
  • Like
Reactions: Evolute IT

Forum statistics

Threads
111,954
Messages
589,921
Members
164,852
Latest member
priya