Miralix OfficeTeam REST API 7.1

Number of APIs: 54

Configuring this collection in Qodex

This is a Qodex Collection of Miralix OfficeTeam REST API v7.1

Each REST API call in this Collection, has a description with in-depth details.

We have tried to make this collection as flexible as possible. This is done by making use of environments and automating some variables.
In addition, tests have been created for most of the REST API calls, to verify that the received JSON response is correct.

Therefore, you need to create an Environment or change a few settings to make this Collection work.

Environment

An Environment should have the following variables:

variableCurrent ValueDescription
X-Miralix-Shared-SecretStringThe Shared Secret code is configured in your Office Team profile. Without this, REST API calls will not work.
httptypehttps, httpConnection method. Use http or https. To use HTTPS, a valid certificate must be installed on the server, which is not part of OfficeTeam.
IP{server ip}, {server dns/url}IP or URL for the Office Team Server
miralixAccountgreenboxMiralix OfficeTeam domain
identificationTypesipUri, id, email, syncIdWhich identification method used to identify an agent
testAgentStringName of the agent you use as a test agent.
callsQueueIdIntegerID of the Audio queue you use for testing. You can create queue and see the ID in Miralix Supervisor.
taskQueueIdIntegerID of the Task queue you use for testing. You can create queue and see the ID in Miralix Supervisor.
outboundCampaignIdIntegerID for an outgoing campaign. In the current version of OfficeTeam, all OutboundCampaignId are mapped to 0
outboundCampaignNameStringName of outbound campaign.
outboundEntryMenuIdIntegerID of entry menu you use for an outbound campaign. The Entry menu needs to be of the type: Outbound campaign
taskEntryMenuIdIntegerID of entry menu you use for tasks. The Entry menu needs to be of the type: task

Note! It is important that you update all 12 variables with your values under Current value.

It is possible to create several environments, with different variables. For example, an environment can be created where https is used and another where http is used.

Collection Variables

If you do not want to create an Environment, you can use Collection Variables.
It is possible to change the same variables as in an Environment.

In addition to the variables found in Environment, this Collection has some additional variables.
These variables are used to hold temporary information that is used in some REST API calls.
There is no need to change these variables as it is done automatically.
But you do have the option to change these variables if you want or if is necessary.

There are the following additional Collection Variables:

variableCurrent ValueDescription
agentIdIntegerID for the agent that the REST API call relates to. Automatically set/change when Agent overview is called in this collection
sipUriStringSIP URI for the agent that the REST API call relates to. Automatically set/change when Agent overview is called in this collection
emailStringEmail for the agent that the REST API call relates to. Automatically set/change when Agent overview is called in this collection
syncIdStringSync ID for the agent that the REST API call relates to. Automatically set/change when Agent overview is called in this collection
TypeIDStringTemporary copy of agentId, sipUri, email, or syncID, depending on the identificationtype selected. Automatically set/change before each REST API call in this collection (Part of the Collection Pre-request Script)
QueueCallIdIntegerTemporary copy of QueueCallId for the call offered to an agent. Automatically set/change when Information on current offered/answered queue call for a specific agent is called in this collection
TaskIdIntegerID for a Task. TaskId is automatically increased by 1 every time Create a task in a queue is called in this collection
CustomWebApiStringName of a Custome Data View. Automatically set/change when Overview of available Custom Data Views is called in this collection

Attention!

It is sometimes necessary to use one of the following requests first for some of the underlying Collection variables to be set correctly.

Agent methods -> Agent overview -> Agent overview
Retrieves AgentId, AgentSipUri, AgentEmail, and AgentSyncId from your test Agent (Environment/Collection variable), and then sets the agentId, sipUri, email, and syncId variables.
These variables are automatically used as TypeID, depending on which identificationType is selected.

Agent methods -> Information for an Agent -> Information on current offered/answered queue call for a specific agent
Retrieves QueueCallId from the call currently offered to the agent.
The QueueCallId variable is used in:

  • Agent Methods -> Information on an Active Agent -> Pick a Call on behalf of an Agent
  • Agent Methods -> Call Recordings for Agent -> Call Recordings for Agent
  • Queue methods -> Overview of all queues, calls, callback calls and call recordings -> Overview of all recorded calls
  • Queue methods -> Information for a specific queue -> Overview of all recorded calls from a specific queue
  • Queue methods -> Overview and call management of queued calls -> Delete a specific call with a queue call ID
  • Queue methods -> Overview and call management of queued calls -> Delete a call from a specific queue with a queue call ID
  • Queue methods -> Call recordings from queue call -> Overview of all recorded calls
  • Queue methods -> Call recordings from queue call -> Overview of all recorded calls from a specific queue
  • Queue methods -> Call recordings from queue call -> Get a recording of a queue call
  • Call methods -> Updating calls > Update existing calls metadata

Queue methods -> Task management in queues -> Create a task in a queue
TaskId is increased by 1 when run. This is done in order not to create tasks with the same ID.
The TaskId variable is used in:

  • Queue methods -> Tasks management in queue -> Create a task in a queue
  • Task methods -> Task management -> Get a specific task
  • Task methods -> Task management -> Remove a task

View methods -> Custom Data Views -> Overview of available Custom Data Views
Retrieves the first available Custom Data View name from the reply, and saves it in the CustomWebApi variable.
The CustomWebApi variable is used in:

  • View methods -> Custom Data Views -> Custom Data View Example

Web service in Miralix OfficeTeam v7.1

Miralix OfficeTeam offers web service as an interface for 3rd party applications (ASP.NET Web API Self-hosted)
Web service is called via HTTP or HTTPS calls, which can include a number of parameters.

To activate the Web service, one of the following Miralix Licenses is required. * 4003 - (WebHooks - Event Hub) Access: All * 5010 - (Integration til Capturi) Access: * Agent methods -> Agent overview -> Agent overview * Agent methods -> Aggregated overview of agents, including a summary -> Aggregated overview of agents, including a summary * Agent methods -> Call Recordings for Agent -> Call Recordings for Agent * Queue methods -> Overview of all queues, calls, callback calls and call recordings -> Overview of all queues * Queue methods -> Overview of all queues, calls, callback calls and call recordings -> Overview of all recorded calls
* Queue methods -> Aggregated overview of queues, including a summary -> Aggregated overview of queues, including a summary * Queue methods -> Information for a specific queue -> Overview of all recorded calls from a specific queue * Queue methods -> Call recordings from queue call -> Get a recording of a queue call * 5013 - (Integration til TeleFaction) Access: * Agent methods -> Agent overview -> Agent overview * Agent methods -> Aggregated overview of agents, including a summary -> Aggregated overview of agents, including a summary * 5015 - (Integration til IntraManager Board) Access: All

The availability of different parts of the Web service depends on the license available. If certain parts are not accessible, a response with an HTTP code of 403 Forbidden will be returned.

As part of the OfficeTeam service, the web service run under an Atlas domain (miralixAccount), and can be activated/deactivated in the configuration via Miralix Wrench. A Shared Secret must also be specified here, which is a shared key that gives access to the Web service.

Base URL: https://{ip/dns}/mot/{miralixAccount}

Payload data format

Based on the HTTP Header Accept, results will be in JSON format (application/json).
JSON naming follows the C# Coding Guidelines, where everything primarily use PascalCasing.
Date/time is primarily in UTC+0 timezone and formatted according to ISO 8601-1:2019

All examples are shown with a Base URL with HTTPS. When HTTPS is used, a valid certificate must be installed, which is not part of the OfficeTeam configuration. It is possible to use HTTP without a certificate.

Authorization for Web service

The HTTP Header X-Miralix-Shared-Secret must always be included in all calls to the Web service. This is the shared key that provides access.

// Example
X-Miralix-Shared-Secret: IAzcGml268Z4AoFk7h98fc6gJCEo68

HTTPS

A certificate, bound to the domain being called, must be installed on the server, e.g. webapi.example.com (Star certificate can also be used ex: * .example.com)

The installed certificate must be bound to port 443.

  1. To open Certificates Store. Press Win+R and run certlm.msc
  2. Find Certificates (Local Computer -> Personal -> Certificates) and open it
  3. Copy the Thumbprint for later
  4. Start a Command Prompt as an Administrator
  5. Bind the certificate to port 443 with this command (replace {Thumbprint} with your Thumbprint):

    netsh http add sslcert ipport=0.0.0.0:443 appid="{B24A9EDF-5501-4C8C-A607-01D443B373CA}" certhash={Thumbprint}
  6. Next an inbound rule needs to be created in the Windows Firewall. Open “Windows Firewall with Advanced Security”.

  7. Create the following inbound rule:
    Rule Type: Port
    Protocol and Ports: TCP 443
    Action: Allow the connection
    Profile: Select all profiles
    Navn: Miralix OfficeTeam Web Service

It is recommended to use a reverseProxy to increase security.

HTTP method - GET, POST etc.

HTTP GET, PUT, DELETE, POST, HEAD and PATCH are used, in connection with the various functions, that can be activated.

MethodDescription
GETReturns the current value of an object
PUTUpdate an object, or create a named object when appropriate
DELETEDelete an object
POSTCreate a new object based on the provided data, or send a command
HEADReturn the metadata of an object to a GET-response. Resources that support the GET-method CAN also support the HEAD-method
PATCHApply a partial update to an object

HTTP Response Codes

Miralix OfficeTeam can respond with these HTTP codes.

  • 200 - OK
  • 201 - Created
  • 202 - Accepted
  • 400 - Bad Request
  • 401 - Unauthorized
  • 403 - Forbidden
  • 404 - Not Found
  • 405 - Method Not Allowed
  • 500 - Internal Server Error
  1. Agent methods-Agent Overview - Agent overview GET {{httptype}}://{{IP}}/mot/{{miralixAccount}}/agents

  2. Agent methods-Information for an Agent - Information for a specific agent GET {{httptype}}://{{IP}}/mot/{{miralixAccount}}/agents/{{identificationType}}/{{TypeID}}

  3. Queue methods-Overview of all queues, calls, callback calls and call recordings - Overview of all queue calls GET {{httptype}}://{{IP}}/mot/{{miralixAccount}}/queues/calls

  4. Queue methods-Overview of all queues, calls, callback calls and call recordings - Overview of all callback calls GET {{httptype}}://{{IP}}/mot/{{miralixAccount}}/queues/calls/callbacks

  5. Queue methods-Overview of all queues, calls, callback calls and call recordings - Overview of all recorded calls GET {{httptype}}://{{IP}}/mot/{{miralixAccount}}/queues/calls/recordings?fromQueueCallId={{QueueCallId}}

  6. Queue methods-Aggregated overview of queues, including a summary - Aggregated overview of queues, including a summary GET {{httptype}}://{{IP}}/mot/{{miralixAccount}}/queues/aggregated?filter=ids&values={{callsQueueId}},{{taskQueueId}}

  7. Queue methods-Information for a specific queue - Overview of a specific queue GET {{httptype}}://{{IP}}/mot/{{miralixAccount}}/queues/{{callsQueueId}}

  8. Queue methods-Information for a specific queue - Overview of all queue calls in a specific queue GET {{httptype}}://{{IP}}/mot/{{miralixAccount}}/queues/{{callsQueueId}}/calls

  9. Queue methods-Information for a specific queue - Overview of all callback calls in a specific queue GET {{httptype}}://{{IP}}/mot/{{miralixAccount}}/queues/{{callsQueueId}}/calls/callbacks

  10. Queue methods-Callback campaign management - Overview of all callback calls associated with outbound campaign name GET {{httptype}}://{{IP}}/mot/{{miralixAccount}}/queues/calls/callbacks/{{outboundCampaignName}}