Activity Service Endpoints

API reference for querying session counts, session details, and participant information via the legacy Activity Service.

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

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

Note
Some operations are strictly for use with specific third-party integrations and are not documented in this generic reference.

Output Values

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

ValueDescription
Session TypeSession type is one of "C" (cobrowse), "G" (Glance screen sharing), or "V" (video).
Session StatusA 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

Note: Some API methods filter out sessions with certain status values. Not every method returns sessions with all these status values.
Width and HeightThe 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 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 DurationSession duration is in seconds. It is 0 for active sessions.
Guest TypeGuest type is one of:
  • Agent: Agent (Glance user) in a Cobrowse session
  • Visitor: Website visitor (customer) in a Cobrowse session
  • Host: Glance user who has started a screen-sharing session
  • Guest: Guest of a screen-sharing session
Guest StatusGuest 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 a clean close (may have dropped)

See Session Status and Session Guest Status for more details.
Guest DurationGuest duration is in seconds. It is 0 for active guests.
Guest InformationGuest 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 a customer account is not configured to gather this information, these values are empty.

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

Sample Session Records (XML)

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 set to application/json. The parameters are passed in a JSON format object in the post data.

Sample Curl Example

Terminal
curl -X POST [https://www.glance.net/services/activityservice.asmx/PartnerCompletedSessions](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

JSON
{
    "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
                            }
                        ]
                    }
                ]
            }
        ]
    }
}