User Status Logs

It is possible for customers with 3CX to define custom statuses in the VoIPcube Portal. Whenever a user selects one of these statuses in the VoIPcube Client, the action is logged in our system. Via the Customer Service API these logs can be fetched.

Endpoint

There is a single endpoint that can be used to retrieve the user status logs. The endpoint is available on the Customer Service API located at https://customer.voipcube.nl.

The following endpoint can be used to fetch the user status logs:

  • GET: /stats/user-statuses

An API key is needed to access the customer service API. This API key has to be attached to the HTTPS requests in the Key header. The key can be generated in the VoIPcube portal on the Customer page

Query string parameters

Several query string parameters can be provided in order to customize the response.

Query string parameter

Required

Description

from

true

Date to mark the start of the query period for which to fetch logs. Must be noted in international date format, e.g.: 2023-05-29T15:02:10Z (the time portion is optional, if not provided 00:00:00 is assumed)

to

true

Date to mark the end of the query period for which to fetch logs. Must be noted in international date format, e.g.: 2023-05-29T15:02:10Z (the time portion is optional, if not provided 00:00:00 is assumed)

userIds

false

Possibility to only fetch the logs of specific userIds. If provided, must be given as an array, e.g.: userIds[]=1d0abaa0-f0f8-42b3-b0f5-d755d33cf3fd&userIds[]=ebd1a29a-8980-404c-9def-cd54865abdc1

page

false

If used, turns on pagination. To be used in combination with the size query string parameter. Must contain a whole, positive number. If size is provided, but page is not, or it contains an invalid value, it will default to a value of 1.

size

false

If used, turns on pagination. To be used in combination with the page query string parameter. Must contain a whole, positive number. If page is provided, but size is not, or it contains an invalid value, it will default to a value of 25.

Response

Given that the request was formatted correctly. It will return a response that looks like the following:

[
  {
      "status": "Customer visit",
      "userId": "0d00ae63-5b5d-45b9-a7c0-88f9cfb26b5e",
      "time": "2023-07-19T12:58:19.282Z"
  },
  {
      "status": "Researching problem",
      "userId": "0d00ae63-5b5d-45b9-a7c0-88f9cfb26b5e",
      "time": "2023-07-19T13:11:22.600Z"
  },
  {
      "status": "Available",
      "userId": "ebd1a29a-8980-404c-9def-cd54865abdc1",
      "time": "2023-07-19T13:12:55.243Z"
  },
  {
      "status": "",
      "userId": "ebd1a29a-8980-404c-9def-cd54865abdc1",
      "time": "2023-07-19T13:24:04.569Z"
  },
  {
      "status": "Available",
      "userId": "0d00ae63-5b5d-45b9-a7c0-88f9cfb26b5e",
      "time": "2023-07-19T13:41:24.075Z"
  }
]

Limitations

To prevent an large data pull, a limitation has been placed on the length of the query period. A maximum period of 1 year worth of logs can be retrieved from the API.

Last updated