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. Session was Waiting but other side did not join within timeout
  • Q: Quit. Session was Waiting, but was ended by host or visitor before 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 their 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 are usually have one of these sets of dimensions, and always have a fixed ratio width:height ratio of 4:3 (NTSC), 11:9 (PAL) or less commonly 5:4 or 16:9 (HD).
  • 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 (guest is in process of connecting but has not yet connected)
  • A: Active (guest connected)
  • C: Completed (guest has left)
  • X: Guest left 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, phone if supplied. These values can be requested from the guest or passed on 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), 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.

Such a request can be made with curl like this:

curl --data '{partnerId:8757, apiKey:"secret123test456", startRange:"2020-02-13", endRange:"2020-02-14", sessionKey:"", nResults:100, nextId:0}' -H "Content-Type:application/json" "https://www.glance.net/services/activityservice.asmx/PartnerCompletedSessions"

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
                            }
                        ]
                    }
                ]
            }
        ]
    }
}

By continuing to use the site, you agree to the use of cookies. Learn More