Sirportly

Toggle Menu

Getting ticket view statistics

This method allows you to retrieve which users are currently viewing a ticket, have viewed a ticket in the past or which users are subscribed to a ticket.

URL

/api/v2/tickets/views

Access

This method can be accessed by account tokens and user tokens where the associated user has access to the tickets UI.

Supported Parameters

  • ticket - the reference for the ticket (required)
  • view - which data to retrieve - see list below (optional, defaults to 'all')

You can set the view property to choose which information is returned from the API.

  • all - returns information about all users who have ever viewed the ticket
  • subscribed - returns information for all users who are subscribed to the ticket
  • current - returns information about all users who are currently viewing the ticket

Example JSON

[
  {
    "timestamp": "2012-04-13T15:09:56Z",
    "subscribed": true,
    "typing": false,
    "current": false,
    "user": {
      "id": 1,
      "username": "adam",
      "first_name": "Adam",
      "last_name": "Cooke",
      "email_address": "adam@atechmedia.com",
      "time_zone": "London",
      "created_at": "2012-04-02T12:32:56Z",
      "activated?": true,
      "invite_code": "8df51cea-975f-da47-9522-1fb7406c1fe7"
    }
  },
  {
    "timestamp": "2012-04-13T15:10:26Z",
    "subscribed": false,
    "typing": true,
    "current": true,
    "user": {
      "id": 2,
      "username": "charlie",
      "first_name": "Charlie",
      "last_name": "Smurthwaite",
      "email_address": "charlie@atechmedia.com",
      "time_zone": "UTC",
      "created_at": "2012-04-02T12:32:56Z",
      "activated?": true,
      "invite_code": "1403d955-a26b-2b2f-3f44-84d040d6b16b"
    }
  }
]