Activity Service Endpoints

Activity Service

This is the API for querying for session counts and session and participant details. https://www.glance.net/services/activityservice.asmx

The WSDL is here: https://www.glance.net/services/activityservice.asmx?WSDL

Some operations are for use with specific third-party integrations and are not documented here.

Output Values

Many Activity Service operations return session records. Here is a description of the output values:

Value Description
Session Type Session type is one of “C” cobrowse, “G” (Glance) screen sharing, or “V” video.
Session Status A single letter describing the state of a session. See Session Status and Session Guest Status for status details.

Common session status values are:
  • W: Waiting, other side has not joined yet
  • A: Active, both sides have joined (host/guest or agent/visitor)
  • C: Completed (session has ended)
  • X: Session ended but without a clean close (may have dropped)
  • T: Timed out. The session was waiting but the other side did not join within the timeout
  • Q: Quit. The session was waiting but was ended by the host or visitor before the other side joined

Some API methods filter out sessions with certain status values: not every method returns sessions with all these status values.
Width and Height The initial width and height of the screen are returned for a screen-sharing session. This can change during a session if the display side changes its monitor or resolution. These values are 0 for co-browsing sessions.

For video sessions, the width and height represent the video resolution. The exact resolution depends on the originating person’s webcam make, model, and settings. Video sessions always have a fixed ratio width:height ratio of 4:3 (NTSC), 11:9 (PAL), or less commonly 5:4 or 16:9 (HD) and usually have one of these sets of dimensions:
  • 160x120
  • 176x144
  • 320x240
  • 352x288
  • 640x360

  • A larger video resolution–such as 640x480 or 704x576–usually means the webcam is misconfigured.
Session Duration Session duration is in seconds, it is 0 for active sessions.
Guest Type Guest type is one of:
  • Agent: agent (Glance user) in Cobrowse session
  • Visitor: website visitor (customer) in Cobrowse session
  • Host: Glance user who has started a screen-sharing session
  • Guest: Guest of a screen-sharing session
Guest Status Guest status is one of:
  • J: Joining (the guest is in the process of connecting but has not yet connected)
  • A: Active (guest connected)
  • C: Completed (guest has left)
  • X: Guest left the session, but without clean close (may have dropped) There are a few other more rarely seen values.

See Session Status and Session Guest Status for guest status details.
Guest Duration Guest duration is in seconds, 0 for active guests.
Guest Information Guest information may include name, email, and phone if supplied. These values can be requested from the guest or passed through a URL used to join the session. Glance gathers this information on behalf of Glance customers and only at their request. If Glance’s customer account is not configured to gather this information these values are empty.

Guest information may include a location node with city, region (state/province), and countryCode. This is derived from the guest’s IP address if available.

Sample Session Records (XML)

<session>
    <id>12423680</id>
    <type>C</type>
    <status>C</status>
    <startTime>2016-02-23T22:17:51Z</startTime>
    <key>6684</key>
    <width>0</width>
    <height>0</height>
    <duration>147</duration>
    <isReverse>false</isReverse>
    <guests>
        <guest>
            <type>visitor</type>
            <status>C</status>
            <startTime>2016-02-23T22:17:22Z</startTime>
            <duration>147</duration>
            <ip>108.49.96.66</ip>
            <clientVersion>iOs 3</clientVersion>
            <protocolVersion>3</protocolVersion>
            <location>
                <city>Newburyport</city>
                <region>MA</region>
                <countryCode>US</countryCode>
            </location>
        </guest>
        <guest>
            <type>agent</type>
            <status>C</status>
            <startTime>2016-02-23T22:17:51Z</startTime>
            <duration>118</duration>
            <ip>66.78.234.123</ip>
            <location>
                 <city>Alexandria</city>
                 <region>VA</region>
                 <countryCode>US</countryCode>
            </location>
        </guest>
    </guests>
</session>

<session>
        <id>12442276</id>
        <type>G</type>
        <status>C</status>
        <startTime>2016-02-24T21:12:09Z</startTime>
        <key>7734</key>
        <width>1920</width>
        <height>1080</height>
        <duration>259</duration>
        <isReverse>false</isReverse>
        <guests>
            <guest>
                <type>host</type>
                <status>C</status>
                <startTime>2016-02-24T21:11:42Z</startTime>
                <duration>259</duration>
                <ip>108.49.96.66</ip>
               <location>
                   <city>Newburyport</city>
                   <region>MA</region>
                   <countryCode>US</countryCode>
              </location>
        </guest>
        <guest>
            <type>guest</type>
            <status>C</status>
            <startTime>2016-02-24T21:12:09Z</startTime>
            <duration>244</duration>
            <ip>66.78.234.123</ip>
            <location>
                <city>Alexandria</city>
                <region>VA</region>
                <countryCode>US</countryCode>
            </location>
            <name>Greta Guest</name>
            <email>sales@glance.net</email>
            <phone>781-646-8505</phone>
            <error>Session ended by other side</error>
        </guest>
    </guests>
</session>

JSON Requests

Calls may also be made passing JSON parameters and returning JSON results.

In order to make a JSON format call, make a POST request with a “Content-Type” header with MIME type “application/json”. The parameters are passed in a JSON format object in the post data.

Sample Curl Example

curl -X POST https://www.glance.net/services/activityservice.asmx/PartnerCompletedSessions -H 'Content-Type:application/json' -d '{"partnerId":12345,"apiKey":"ABCDeF_G12TOFEkzzz","startRange":"2023-02-23T22:00:00Z","endRange":"2023-02-28T22:00:00Z","sessionKey":"","nResults":10,"nextId":0}'

Sample JSON Results

{
    "d": {
        "__type": "ActivityService+groupSessions",
        "nextId": 123456789,
        "users": [
            {
                "__type": "ActivityService+userSessions",
                "userName": "agent.company.glance.net",
                "partnerUserId": "puidValue",
                "validUser": true,
                "invalidReason": null,
                "sessions": [
                  {
                      "__type": "ActivityService+session",
                      "id": 56960588,
                      "type": "V",
                      "status": "C",
                      "startTime": "2020-02-12T11:41:12Z",
                      "key": "9900V51849",
                      "width": 176,
                      "height": 144,
                      "duration": 13,
                      "kbytes": 0,
                      "isReverse": false,
                      "guests": [
                          {
                              "type": "",
                              "status": "X",
                              "startTime": "2020-02-12T11:41:14Z",
                              "duration": 11,
                              "kbytes": 0,
                              "ip": "209.255.163.147",
                              "location": {
                                  "city": null,
                                  "region": null,
                                  "countryCode": "US"
                              },
                              "name": null,
                              "email": null,
                              "phone": null
                          },
                          {
                              "type": "",
                              "status": "X",
                              "startTime": "2020-02-12T11:41:18Z",
                              "duration": 11,
                              "kbytes": 0,
                              "ip": "209.255.163.147",
                              "location": {
                                  "city": null,
                                  "region": null,
                                  "countryCode": "US"
                              },
                              "name": null,
                              "email": null,
                              "phone": null
                          }
                      ]
                  }
                ]
            },
            {
                "__type": "ActivityService+userSessions",
                "userName": "agent2.company.glance.net",
                "partnerUserId": "anotherPUID",
                "validUser": true,
                "invalidReason": null,
                "sessions": [
                    {
                        "__type": "ActivityService+session",
                        "id": 57125147,
                        "type": "C",
                        "status": "C",
                        "startTime": "2020-02-13T18:34:18Z",
                        "key": "1111",
                        "width": 0,
                        "height": 0,
                        "duration": 9,
                        "kbytes": 30,
                        "isReverse": false,
                        "guests": [
                            {
                                "type": "visitor",
                                "status": "C",
                                "startTime": "2020-02-13T18:34:15Z",
                                "duration": 9,
                                "kbytes": 30,
                                "ip": "208.253.26.138",
                                "location": {
                                    "city": "Seekonk",
                                    "region": "MA",
                                    "countryCode": "US"
                                },
                                "name": "Test guy",
                                "email": "jsmith@email.net",
                                "phone": "314-555-1212"
                            },
                            {
                                "type": "agent",
                                "status": "C",
                                "startTime": "2020-02-13T18:34:18Z",
                                "duration": 6,
                                "kbytes": 18,
                                "ip": "208.253.26.138",
                                "location": {
                                    "city": "Seekonk",
                                    "region": "MA",
                                    "countryCode": "US"
                                },
                                "name": null,
                                "email": null,
                                "phone": null
                            }
                        ]
                    }
                ]
            }
        ]
    }
}