The User Experience Insight Developer Hub

Welcome to the User Experience Insight developer hub. You'll find comprehensive guides and documentation to help you start working with User Experience Insight as quickly as possible, as well as support if you get stuck. Let's jump right in!

Guides

Python API Example - Group Names

In the User Experience Insight API, a 'Node' refers to a group of sensors.

Here is an example of a python 2.7 script to find all group names.

#!/usr/bin/python2.7
import urllib
import urllib2
import json

## Define the app ID and API key variables
appID = 'request app ID via support'
apiKey = 'request API key via support'

if __name__ == '__main__':

  # The API for all sensor groups
  url = 'https://api.capenetworks.com/v1/nodes'
  headers = { 'x-app-id' : appID, 'x-api-key' : apiKey }
  req = urllib2.Request(url,None,headers)
  response = urllib2.urlopen(req)

  # check if the response was successful
  if response.code == 200:

    # process the response
    result = json.loads(response.read())
    nodes = result['payload']['nodes']
    for node in nodes:
      print node['name']

Example Output

Tokyo
Sydney
Singapore
Shanghai
Melbourne
Macao
Bangkok
Bangalore

Updated about a year ago


Python API Example - Group Names


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.