Countly Documentation

Countly Resources

Here you'll find comprehensive guides to help you start working with Countly as quickly as possible.

Suggest Edits

Introduction

 

This document (please see navigation on the left hand side) lists all API methods, and details the authentication mechanism. Countly API uses HTTP and a RESTful endpoint structure. Request and response payloads are formatted as JSON.

Suggest Edits

/i

Writing sessions, metrics and events

 
gethttps://try.count.ly/i?app_key=app_key&device_id=device_id
curl --request GET \
  --url 'https://try.count.ly/i?device_id=device_id&app_key=app_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/i',
  qs: { device_id: 'device_id', app_key: 'app_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/i?device_id=device_id&app_key=app_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/i?device_id=device_id&app_key=app_key");

xhr.send(data);
import requests

url = "https://try.count.ly/i"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{"result":"Success"}

Query Params

app_key
string

APP_KEY of an app for which to report

device_id
string

Your generated or device specific unique device ID to identify user

begin_session
int32

(optional) Should provide value 1 to indicate session start

session_duration
int32

(optional) provides session duration in seconds, can be used as heartbeat to update current sessions duration, recommended time every 60 seconds

end_session
int32

(optional) Should provide value 1 to indicate session end

ip_address
string

(optional, can only be used with begin_session) IP address of user to determine user location, if not provided, countly will try to establish ip address based on connection data

timestamp
int32

(optional) 10 digit UTC timestamp for recording past data.

hour
string

(optional) current user local hour (0 - 23)

dow
string

(optional) day of the week (0-sunday, 1 - monday, ... 6 - saturday)

metrics
string

(optional, can only be used with begin_session) JSON object as string to provide metrics to track with the user

events
string

(optional) JSON array as string containing event objects

user_details
string

(optional) JSON object as string containing information about users

country_code
string

(optional) ISO Country code for the user's country

city
string

(optional) Name of the user's city

location
string

(optional) users lat,lng

old_device_id
string

(optional) provide when changing device ID, so server would merge the data

 

This is main path where to submit session data, metrics and events.

If you want to develop SDK for Countly, you would need to implement calls that you need in your SDK to Countly REST API from this page.

Each session should start with begin_session=1, then it should be extended with session_duration=seconds, to indicate the duration of the session. Session duration should not exceed time period specified in /api/config.js as session_duration_limit which by default is 120 seconds.
So you need to update session at least once in this period, to collect correct session duration information. The recommended period is every 60 seconds.
When user exists app or ends session, you can provided end_session=1 to indicate that this session ended for user.

Mandatory Parameters

Parameters listed below are mandatory for every write API request.

app_key

Application key for the current application. Can be obtained from your dashboard after creating your application.

device_id

Unique id for the user device. You can retrieve device specific ID or generate any unique ID you can using libraries like Open UDID

Optional Parameters

Session

begin_session

Indicates the start of the user session. begin_session should be used with the API call you make at the beginning of user's session. begin_session should be given the value 1.

end_session

Indicates the end of the user session. end_session should be used with the API call you make at the end of user's session. end_session should be given the value 1.

session_duration

Heartbeat like parameter for extending session duration of the user for session_duration seconds.

Metrics

JSON object containing key, value pairs. metrics can only be sent together with begin_session.

Currently below predefined metrics are valid;

 metrics={
   "_os": "Android",
   "_os_version": "4.1",
   "_device": "Samsung Galaxy",
   "_resolution": "1200x800",
   "_carrier": "Vodafone",
   "_app_version": "1.2",
   "_density": "MDPI",
   "_store": "com.android.vending",
   "_browser": "Chrome",
   "_browser_version": "40.0.0"
}

Events

JSON array containing event objects. Each event object can have below properties;

  • key (Mandatory, String)
  • count (Mandatory, Integer)
  • sum (Optional, Double)
  • dur (Optional, Double)
  • segmentation (Optional, Dictionary Object)
  • timestamp (Optional)
  • hour (Optional)
  • dow (Optional)
    A sample event array will look like this;
 [
          {
              "key": "level_success",
              "count": 4
          },
          {
              "key": "level_fail",
              "count": 2
          },
          {
              "key": "in_app_purchase",
              "count": 3,
              "sum": 2.97,
              "dur": 1000,
              "segmentation": {
                  "app_version": "1.0",
                  "country": "Germany"
              }
          }
]

Ater this request we will be able to;

See how many times user completed a level successfully or failed.
See how many times in app purchase occurred and the total amount of these IAPs.
Segment IAP data into two levels, one is app_version and the other is country. So we will be able to identify which application version performed best in terms of IAP and which countries tend to do IAP more.

User details

JSON object containing key, value pairs.

All values are optional and currently you can pass this information about user:

user_details={
    "name": "Arturs Sosins",
    "username": "ar2rsawseen",
    "email": "test@test.com",
    "organization": "Countly",
    "phone": "+37112345678",
    //Web URL to picture
    "picture": "https://pbs.twimg.com/profile_images/1442562237/012_n_400x400.jpg", 
    "gender": "M",
  	"byear": 1987, //birth year
  	"custom":{
      "key1":"value1",
      "key2":"value2",
      ...
    }
  }

If you set value as null, you will delete the property.

Additionally you can upload picture of the user to the server by sending POST request to the same URL you would provide user information to.

If you don't have any user information to provide, you can simply upload profile picture to
"/i?app_key=APP_KEY&device_id=DEVICE_ID&user_details"

Accepted picture formats are .png, .gif and .jpeg and picture will be resized to maximal 150x150 dimensions.

Modifying custom user data

You can provide custom properties for user using custom key and providing JSON object with key and values to store for this user.

Note: dots (.) and dollar signs ($) in key names will be stripped out.

Also you can modify custom properties, like increment value stored on server by 1, or store array of values (including unique only values) under same key.

Here are example of possible modifications:

user_details={
  	"custom":{
      //simply set key value
      "key":"value",
      //increment value on server by 2
      "key2":{"$inc":2},
      //multiply value on server by 2
      "key3":{"$mul":2},
      //store maximal value between provided and server value
      "key4":{"$max":10},
      //store minimal value between provided and server value
      "key5":{"$min":10},
      //store value if it does not exist on server yet
      "key6":{"$setOnce":"initial value"},
      //add one value to array
      "key7":{"$push":"value"},
      //add multiple values to array
      "key8":{"$push":["value1","value2"]},
      //add value to array, if it is already in array, it won't add it
      "key9":{"$addToSet":"value"},
      //add values to array, if values is already in array, it won't add them
      "key10":{"$addToSet":["value1","value2"]},
      //remove one value from array
      "key11":{"$pull":"value"},
      //remove multiple values from array
      "key12":{"$pull":["value1","value2"]},
      ...
    }
  }

List of possible commands:

  • $inc - to increment value on server by provided value (if no value on server, assumes it is 0)
  • $mul - to multiply value on server by provided value (if no value on server, assumes it is 0)
  • $max - to store maximal value from the one on server and provided value (if no value on server, uses provided value)
  • $min - to store minimal value from the one on server and provided value (if no value on server, uses provided value)
  • $setOnce - set's value to key, only if property was not defined before for this user
  • $push - add one or many values to array property (can have multiple same values, if property is not array, converts it to array)
  • $addToSet - add one or many values to array property (will only store unique values in array, if property is not array, converts it to array)
  • $pull - remove one or many values from array property (only removes value from array properties)

Consents

SDK can provide or revoke consent for specific features in consent object using feature name as key and value:

  • true - to provide consent
  • false - to revoke.

Currently available features are:

  • sessions - tracking when, how often and how long users use your app/website
  • events - allow sending custom events to server
  • location - allow sending location information, if consent not given, SDK should force send empty location, to prevent server from determining location by IP address
  • views - allow tracking which views/pages user visits
  • scrolls - allow tracking user scrolls for scroll heatmap
  • clicks - allow tracking user clicks for heatmap as well as link clicks
  • forms - allow tracking user's form submissions
  • crashes - allow tracking crashes, exceptions and errors
  • attribution - allow tracking from which campaign did user come
  • users - allow collecting/providing user information, including custom properties
  • push - allow push notifications
  • star-rating - allow to send their rating and feedback
  • accessory-devices - allow to detect accessory or wearable devices like Apple Watch etc.

Note that available features may change depending on platform. And SDK can implement and manage it own set of features. The API is only for notifying server to store consent status for legal reasons.

A sample providing consent for crashes and revoking consent from sessions would look like this:

consent={
  "crashes":true,
  "sessions": false
}

Change ID and merge data

old_device_id

If for some reason you want to change device_id that was provided to Countly for specific user, you can use new device id as device_ID parameter and specify old device ID as old_device_id parameter. That way Countly will switch the device ID used for this user from old one to new one transferring all data to it. If user with new device ID already existing, then their data will be merged together into single user.

device_id=myNewId&old_device_id=myOldId

Additional parameters

timestamp

10 digit UTC timestamp for recording past data.

hour

Current user local hour (0 - 23)

dow

Currenr user day of the week (0-sunday, 1 - monday, ... 6 - saturday)

ip_address

IP address of the user. By default IP address of the user is detected from the connection but you can send it manually using this parameter. ip_address parameter can only be used with the begin_session request.

country_code and city

Additionally to passing the IP address from which location can be determined, it is also possible to directly provide user's country and city. For country you only need to provide ISO standard two letter country code. For city you may provide city name as string value

location

If you can provide user's location coordinates, you can do that though this parameter, passing value as location=lat,lng

For example, location=56.42345,123.45325

Push notifications

To specify that device is capable of receiving push notifications, you need to provide a token to Countly server by adding these parameters to your request:

token_session=1 saying that you will provide token in this request

test_mode=0 for production token, 1 for development build token, 2 for test / iOS Ad Hoc / TestFlight token

ios_token = {your token here} - push notification token for iOS

android_token = {your token here} - push notification token for Android

token_session=1&test_mode=0&android_token=12345678

To notify Countly that user performed action on a push notification send [CLY]_push_action with "i" segment as message ID. If user opened a default URL, add "b" segment with "0" in it. In case user opened one of action buttons, put index of that button in "b" segment (starting from "1"). In the example below server will record a click on first button of message 123456789012345678901234.

events=[
          {
              "key": "[CLY]_push_action",
              "count": 1,
              "segmentation": {
                  "b": "1",
                  "i": "123456789012345678901234"
              }
          }
]

Crash Analytics

crash - JSON object containing key, value pairs.

All values except _os, _app_version and _error are optional, but more information you provide, more information you will have when resolving crashes

Currently supported fields are:

crash={
	//device metrics
	"_os":"Android",
	"_os_version":"4.1",
	"_manufacture":"Samsung", //may not be provided for ios or be constant, like Apple
	"_device": "Galaxy S4", //model for Android, iPhone1,1 etc for iOS
	"_resolution": "1900x1080",
	"_app_version":"2.1",
	"_cpu": "armv7", //type of cpu used on device (for ios will be based on device)
	"_opengl":"2.1", //version of open gl supported

	//state of device
	"_ram_current":1024, //in megabytes
	"_ram_total":4096,
	"_disk_current":3000, //in megabytes
	"_disk_total":10240,
  "_bat":99, //battery level from 0 to 100
	//or provide "_bat_current" and "_bat_total" if other scale
	"_orientation":"portrait", //in which device was held, landscape, portrait, etc

	//bools
	"_root":false, //true if device is rooted/jailbroken, false or not provided if not
	"_online":true, //true if device is connected to the internet (WiFi or 3G), false or 	not provided if not connected
	"_muted":false, //true if volume is off, device is in muted state
	"_background":false, //true if app was in background when it crashed

	//error info
	"_name":"Null Pointer exception", //optional if provided by OS/Platform, else will use first line of 		stack
	"_error":"Some error stack here", //error stack, can provide multiple separated by blank new line
	"_nonfatal":false, //true if handled exception, false or not provided if unhandled crash
	"_logs":"logs provided here",//some additional logs provided, if any 
	"_run":180, //running time since app start in seconds

	//custom key/values provided by developers
	"_custom":{
  	"facebook_sdk": "3.5",
  	"admob": "6.5"
	}
}

You can provide custom properties for crash using custom key and providing JSON object with key and values to store for this crash report and server will segment values for you for the same crash.

Views

You can report what views did user view and for how long. This is done by adding event with key [CLY]_view and event dur property for duration, and providing additional values as event segments, as:

  • name - name of the view
  • visit - 1 or true to count a visit to this view
  • segment - single segment option (platform for mobile apps, domain for websites)
  • start - 1 or true if user started session with this view

The usual flow is to create event when user visits view, and report duration when user exits it.

Here is the example for scenario, where user starts app with view1, views it for 60 seconds and moves to view2, views it for 30 seconds and exists app.

events=[
          {
              "key": "[CLY]_view",
              "count": 1,
              "segmentation": {
                  "name": "view1",
                  "segment": "Android",
                  "visit": 1,
                  "start": 1
              }
          }
]
events=[
					//firstly report previous view duration
          {
              "key": "[CLY]_view",
              "count": 1,
              "dur": 60,
              "segmentation": {
                  "name": "view1",
                  "segment": "Android"
              }
          },
          //then report new view
          {
              "key": "[CLY]_view",
              "count": 1,
              "segmentation": {
                  "name": "view2",
                  "segment": "Android",
                  "visit": 1
              }
          }
]
events=[
					//report last view duration on exit
          {
              "key": "[CLY]_view",
              "count": 1,
              "dur": 30,
              "segmentation": {
                  "name": "view2",
                  "segment": "Android"
              }
          }
]

View actions

Additionally it is possible to report actions taken on views to display on heat maps. For that you need to create [CLY]_action event with segment properties as:

  • type - action type, as click, touch, longpress,etc
  • x - x coordinate of action
  • y - y coordinate of action
  • width - width of the screen
  • height - height of the screen

As example:

events=[
          {
              "key": "[CLY]_action",
              "count": 1,
              "segmentation": {
                  "type": "click",
                  "x": 120,
                  "y": 200,
                  "width": 1920,
                	"height": 1200
              }
          }
]

Star Rating

SDK can provide a dialog for user to rate the app. To store this rating on server you need to submit custom event with key "[CLY]_star_rating" with these segments:

  • platform - platform on which application runs
  • app_version - application's version number
  • rating - user's 1-to-5 rating

Star rating plugin should be enabled on server for this data to be properly recorded

Attribution

There is a way you can attribute a click from campaign to an install through API. Usually it is used to import attribution from third party sites as a postback to Count.ly server. You at least need to provide campaign ID (the last part of your campaign url).

If possible, provide also Countly generated user ID (which is usually passed to campaigns url too),mostly for the situations where you can pass data to app install like Google Play INSTALL_REFERRER.

You can provide any number of other conversion segments and their values, they all need to be prefixed by campaign_

To sum it up:

campaign_id

ID of the campaign you created in Countly

campaign_user

Countly generated user ID based on digital fingerprint of the user, that you can pass with the link to install if platform supports it

campaign_{param}

Any other parameters/segments that you want to pa with this conversion

Suggest Edits

/api-key

Retrieve user's API_KEY

 
gethttps://try.count.ly/api-key
curl --request GET \
  --url https://try.count.ly/api-key
var request = require("request");

var options = { method: 'GET', url: 'https://try.count.ly/api-key' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/api-key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/api-key");

xhr.send(data);
import requests

url = "https://try.count.ly/api-key"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

9a4d196c01d3ca82876c0398ab776e5e
Unauthorized
 

This API call is meant to retrieve user's API_KEY based on user's login credentials (username and password).

Most common use case is when integrating Countly with your own system, to retrieve user's API KEY so API requests can be made on user's behalf (usually server to server requests)

This API endpoint uses Basic Authentication, so HTTP request should be (constructed respectively)[https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#Basic_authentication_scheme]

The easiest way is to construct authentication URL and retrieve API key in body of response:

https://username:password@www.example.com/

Suggest Edits

/o/users/all

Retrieve information about all users

 
gethttps://try.count.ly/o/users/all?api_key=api_key
curl --request GET \
  --url 'https://try.count.ly/o/users/all?api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o/users/all',
  qs: { api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o/users/all?api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o/users/all?api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/o/users/all"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "542bacc5a8e4641667000001": {
        "_id": "542bacc5a8e4641667000001",
        "api_key": "9a4d196c01d3ca82876c0398ab774e5e",
        "full_name": "Test Test",
        "username": "test",
        "email": "test@domain.com",
        "global_admin": true,
        "is_current_user": true
    },
    "542bacc6b3bced1a67000001": {
        "_id": "542bacc6b3bced1a67000001",
        "api_key": "d735fa946dd0a5bbf85b816da66cf5f8",
        "full_name": "Name Surname",
        "username": "test1",
        "email": "test@domain.com.test",
        "global_admin": false,
        "is_current_user": false
    }
}
{"result":"User does not exist"}

Query Params

api_key
string

Admin API_KEY

callback
string

(optional) name of callback function for JSONP output

 

Retrieve information about all users.
This request require API_KEY of a user who is global administrator

Suggest Edits

/o/users/me

Retrieve information about user

 
gethttps://try.count.ly/o/users/me?api_key=api_key
curl --request GET \
  --url 'https://try.count.ly/o/users/me?api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o/users/me',
  qs: { api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o/users/me?api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o/users/me?api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/o/users/me"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "_id": "542bacc5a8e4641667000001",
    "api_key": "9a4d196c01d3ca82876c0398ab774e5e",
    "email": "test@domain.com",
    "full_name": "Test Test",
    "global_admin": true,
    "in_user_hash": "e06f722c5295bf8bd4149a54d3303102c398b45f",
    "in_user_id": "26ede5cdbfa68a55a9c51ea207ec74fd",
    "username": "test"
}
{"result": "User does not exist"}

Query Params

api_key
string

User API_KEY

callback
string

(optional) name of callback function for JSONP output

 

Retrieve information about user, who is the owner of the API_KEY

Suggest Edits

/o/apps/all

Retrieve information about all apps

 
gethttps://try.count.ly/o/apps/all?api_key=api_key
curl --request GET \
  --url 'https://try.count.ly/o/apps/all?api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o/apps/all',
  qs: { api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o/apps/all?api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o/apps/all?api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/o/apps/all"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "admin_of": {
        "542bad58b3bced1a67000003": {
            "_id": "542bad58b3bced1a67000003",
            "category": "6",
            "country": "TR",
            "key": "7a52e705d83401780ec487879c6b1b6ebb9f34b0",
            "name": "Test",
            "timezone": "Europe/Istanbul"
        }
    },
    "user_of": {
        "542bad58b3bced1a67000003": {
            "_id": "542bad58b3bced1a67000003",
            "category": "6",
            "country": "TR",
            "key": "7a52e705d83401780ec487879c6b1b6ebb9f34b0",
            "name": "Test",
            "timezone": "Europe/Istanbul"
        }
    }
}
{"result":"User does not exist"}

Query Params

api_key
string

Admin API_KEY

callback
string

(optional) name of callback function for JSONP output

 

Retrieve information about all users. This request require API_KEY of a user who is global administrator

Suggest Edits

/o/apps/mine

Retrieve information about user's apps

 
gethttps://try.count.ly/o/apps/mine?api_key=api_key
curl --request GET \
  --url 'https://try.count.ly/o/apps/mine?api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o/apps/mine',
  qs: { api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o/apps/mine?api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o/apps/mine?api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/o/apps/mine"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "admin_of": {
        "542bad58b3bced1a67000003": {
            "_id": "542bad58b3bced1a67000003",
            "category": "6",
            "country": "TR",
            "key": "7a52e705d83401780ec487879c6b1b6ebb9f34b0",
            "name": "Test",
            "timezone": "Europe/Istanbul"
        }
    },
    "user_of": {
        "542bad58b3bced1a67000003": {
            "_id": "542bad58b3bced1a67000003",
            "category": "6",
            "country": "TR",
            "key": "7a52e705d83401780ec487879c6b1b6ebb9f34b0",
            "name": "Test",
            "timezone": "Europe/Istanbul"
        }
    }
}
{"result":"User does not exist"}

Query Params

api_key
string

User's API_KEY

callback
string

(optional) name of callback function for JSONP output

 

Retrieve information about apps which were created by the user, who is the owner of the API_KEY

Suggest Edits

/o/apps/details

Retrieve detailed information about app users (available from v16.12)

 
gethttps://try.count.ly/o/apps/details?api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o/apps/details?app_id=app_id&api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o/apps/details',
  qs: { app_id: 'app_id', api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o/apps/details?app_id=app_id&api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o/apps/details?app_id=app_id&api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/o/apps/details"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{  
   "app":{  
      "owner":"gorkem",
      "created_at":1479234325,
      "edited_at":1480499355,
      "last_data":1480499355
   },
   "global_admin":[  
      {  
         "_id":"56e531f23934b132475d0e69",
         "full_name":"Arturs",
         "username":"as"
      },
      {  
         "_id":"56e53338a941253d470e0d35",
         "full_name":"Gorkem",
         "username":"gorkem"
      }
   ],
   "admin":[  
      {  
         "_id":"56e7300389cef9ff30cf6aa0",
         "full_name":"Onur",
         "username":"oas"
      }
   ],
   "user":[  
      {  
         "_id":"56e7300389cef9ff30cf6aa0",
         "full_name":"me",
         "username":"me"
      }
   ]
}
{"result":"User does not exist"}

Query Params

api_key
string

User's API_KEY

app_id
string

id of the app for which to fetch info

callback
string

(optional) name of callback function for JSONP output

 

Retrieve information about apps which were created by the user, who is the owner of the API_KEY

Suggest Edits

/o?method=locations

Retrieve locations of the app

 
gethttps://try.count.ly/o?method=locations&api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o?app_id=app_id&api_key=api_key&method=locations'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o',
  qs: { app_id: 'app_id', api_key: 'api_key', method: 'locations' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o?app_id=app_id&api_key=api_key&method=locations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o?app_id=app_id&api_key=api_key&method=locations");

xhr.send(data);
import requests

url = "https://try.count.ly/o"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "2015": {
    "2": {
      "2": {
        "20": {
          "e": 7,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 60
        },
        "e": 7,
        "t": 1,
        "JP": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 60
      },
      "3": {
        "22": {
          "e": 3,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 30
        },
        "e": 3,
        "t": 1,
        "DE": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 30
      },
      "4": {
        "18": {
          "e": 3,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 30
        },
        "e": 3,
        "t": 1,
        "GB": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 30
      },
      "5": {
        "10": {
          "e": 1,
          "t": 1,
          "n": 1,
          "u": 1
        },
        "11": {
          "e": 2,
          "d": 30
        },
        "e": 3,
        "t": 1,
        "JP": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 30
      },
      "10": {
        "10": {
          "e": 3,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 30
        },
        "e": 3,
        "t": 1,
        "GB": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 30
      },
      "13": {
        "8": {
          "e": 5,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 30
        },
        "e": 5,
        "t": 1,
        "US": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 30,
        "ds": {
          "1": 1
        }
      },
      "17": {
        "0": {
          "e": 6,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 30
        },
        "e": 6,
        "t": 1,
        "US": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 30
      },
      "20": {
        "2": {
          "e": 10,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 60
        },
        "e": 10,
        "t": 1,
        "US": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 60,
        "ds": {
          "2": 1
        }
      },
      "23": {
        "9": {
          "e": 6,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 60
        },
        "10": {
          "e": 7,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 30
        },
        "e": 13,
        "t": 2,
        "Unknown": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 2,
        "u": 2,
        "f": {
          "0": 2
        },
        "l": {
          "0": 2
        },
        "JP": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "d": 90,
        "ds": {
          "1": 1,
          "2": 1
        }
      },
      "u": 10,
      "Unknown": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "f": {
        "0": 10
      },
      "l": {
        "0": 10
      },
      "JP": {
        "u": 3,
        "t": 3,
        "n": 3
      },
      "GB": {
        "u": 2,
        "t": 2,
        "n": 2
      },
      "US": {
        "u": 3,
        "t": 3,
        "n": 3
      },
      "DE": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "ds": {
        "1": 2,
        "2": 2
      },
      "e": 53,
      "t": 10,
      "n": 10,
      "d": 390
    },
    "u": 10,
    "w8": {
      "u": 3,
      "Unknown": {
        "u": 1
      },
      "f": {
        "0": 3
      },
      "l": {
        "0": 3
      },
      "JP": {
        "u": 1
      },
      "US": {
        "u": 1
      },
      "ds": {
        "1": 1,
        "2": 2
      }
    },
    "Unknown": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "f": {
      "0": 10
    },
    "l": {
      "0": 10
    },
    "JP": {
      "u": 3,
      "t": 3,
      "n": 3
    },
    "w5": {
      "u": 3,
      "JP": {
        "u": 1
      },
      "f": {
        "0": 3
      },
      "l": {
        "0": 3
      },
      "DE": {
        "u": 1
      },
      "GB": {
        "u": 1
      }
    },
    "w6": {
      "u": 2,
      "GB": {
        "u": 1
      },
      "f": {
        "0": 2
      },
      "l": {
        "0": 2
      },
      "JP": {
        "u": 1
      }
    },
    "GB": {
      "u": 2,
      "t": 2,
      "n": 2
    },
    "US": {
      "u": 3,
      "t": 3,
      "n": 3
    },
    "w7": {
      "u": 2,
      "US": {
        "u": 2
      },
      "f": {
        "0": 2
      },
      "l": {
        "0": 2
      },
      "ds": {
        "1": 1
      }
    },
    "DE": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "ds": {
      "1": 2,
      "2": 2
    },
    "e": 53,
    "t": 10,
    "n": 10,
    "d": 390
  },
  "meta": {
    "f-ranges": [
      "0"
    ],
    "l-ranges": [
      "0"
    ],
    "countries": [
      "Unknown",
      "JP",
      "GB",
      "US",
      "DE"
    ],
    "d-ranges": [
      "1",
      "2"
    ]
  }
}

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

period
string

For which time period to provide data, possible values (month, 60days, 30days, 7days, yesterday, hour or [startMiliseconds, endMiliseconds] as [1417730400000,1420149600000])

callback
string

(optional) name of callback function for JSONP output

 

Retrieves the raw location data of the app, the object is divided by time metrics, like year, month, date and can be processed by Countly JavaScript libraries

e - events or requests sent to server

n - new sessions

t - total sessions

u - unique locations

d - total session duration

ds - durations (counts)

f - frequency

l - loyalty

Suggest Edits

/o?method=sessions

Retrieve session information of the app

 
gethttps://try.count.ly/o?method=sessions&api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o?app_id=app_id&api_key=api_key&method=sessions'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o',
  qs: { app_id: 'app_id', api_key: 'api_key', method: 'sessions' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o?app_id=app_id&api_key=api_key&method=sessions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o?app_id=app_id&api_key=api_key&method=sessions");

xhr.send(data);
import requests

url = "https://try.count.ly/o"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "2015": {
    "2": {
      "2": {
        "20": {
          "e": 7,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 60
        },
        "e": 7,
        "t": 1,
        "JP": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 60
      },
      "3": {
        "22": {
          "e": 3,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 30
        },
        "e": 3,
        "t": 1,
        "DE": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 30
      },
      "4": {
        "18": {
          "e": 3,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 30
        },
        "e": 3,
        "t": 1,
        "GB": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 30
      },
      "5": {
        "10": {
          "e": 1,
          "t": 1,
          "n": 1,
          "u": 1
        },
        "11": {
          "e": 2,
          "d": 30
        },
        "e": 3,
        "t": 1,
        "JP": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 30
      },
      "10": {
        "10": {
          "e": 3,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 30
        },
        "e": 3,
        "t": 1,
        "GB": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 30
      },
      "13": {
        "8": {
          "e": 5,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 30
        },
        "e": 5,
        "t": 1,
        "US": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 30,
        "ds": {
          "1": 1
        }
      },
      "17": {
        "0": {
          "e": 6,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 30
        },
        "e": 6,
        "t": 1,
        "US": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 30
      },
      "20": {
        "2": {
          "e": 10,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 60
        },
        "e": 10,
        "t": 1,
        "US": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 60,
        "ds": {
          "2": 1
        }
      },
      "23": {
        "9": {
          "e": 6,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 60
        },
        "10": {
          "e": 7,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 30
        },
        "e": 13,
        "t": 2,
        "Unknown": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 2,
        "u": 2,
        "f": {
          "0": 2
        },
        "l": {
          "0": 2
        },
        "JP": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "d": 90,
        "ds": {
          "1": 1,
          "2": 1
        }
      },
      "u": 10,
      "Unknown": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "f": {
        "0": 10
      },
      "l": {
        "0": 10
      },
      "JP": {
        "u": 3,
        "t": 3,
        "n": 3
      },
      "GB": {
        "u": 2,
        "t": 2,
        "n": 2
      },
      "US": {
        "u": 3,
        "t": 3,
        "n": 3
      },
      "DE": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "ds": {
        "1": 2,
        "2": 2
      },
      "e": 53,
      "t": 10,
      "n": 10,
      "d": 390
    },
    "u": 10,
    "w8": {
      "u": 3,
      "Unknown": {
        "u": 1
      },
      "f": {
        "0": 3
      },
      "l": {
        "0": 3
      },
      "JP": {
        "u": 1
      },
      "US": {
        "u": 1
      },
      "ds": {
        "1": 1,
        "2": 2
      }
    },
    "Unknown": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "f": {
      "0": 10
    },
    "l": {
      "0": 10
    },
    "JP": {
      "u": 3,
      "t": 3,
      "n": 3
    },
    "w5": {
      "u": 3,
      "JP": {
        "u": 1
      },
      "f": {
        "0": 3
      },
      "l": {
        "0": 3
      },
      "DE": {
        "u": 1
      },
      "GB": {
        "u": 1
      }
    },
    "w6": {
      "u": 2,
      "GB": {
        "u": 1
      },
      "f": {
        "0": 2
      },
      "l": {
        "0": 2
      },
      "JP": {
        "u": 1
      }
    },
    "GB": {
      "u": 2,
      "t": 2,
      "n": 2
    },
    "US": {
      "u": 3,
      "t": 3,
      "n": 3
    },
    "w7": {
      "u": 2,
      "US": {
        "u": 2
      },
      "f": {
        "0": 2
      },
      "l": {
        "0": 2
      },
      "ds": {
        "1": 1
      }
    },
    "DE": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "ds": {
      "1": 2,
      "2": 2
    },
    "e": 53,
    "t": 10,
    "n": 10,
    "d": 390
  },
  "meta": {
    "f-ranges": [
      "0"
    ],
    "l-ranges": [
      "0"
    ],
    "countries": [
      "Unknown",
      "JP",
      "GB",
      "US",
      "DE"
    ],
    "d-ranges": [
      "1",
      "2"
    ]
  }
}

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

period
string

For which time period to provide data, possible values (month, 60days, 30days, 7days, yesterday, hour or [startMiliseconds, endMiliseconds] as [1417730400000,1420149600000])

callback
string

(optional) name of callback function for JSONP output

 

Retrieves the raw session data of the app, the object is divided by time metrics, like year, month, date and can be processed by Countly JavaScript libraries

e - events or requests sent to server

n - new sessions

t - total sessions

u - unique locations

d - total session duration

ds - durations (counts)

f - frequency

l - loyalty

Suggest Edits

/o?method=users

Retrieve users of the app

 
gethttps://try.count.ly/o?method=users&api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o?app_id=app_id&api_key=api_key&method=users'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o',
  qs: { app_id: 'app_id', api_key: 'api_key', method: 'users' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o?app_id=app_id&api_key=api_key&method=users")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o?app_id=app_id&api_key=api_key&method=users");

xhr.send(data);
import requests

url = "https://try.count.ly/o"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "2015": {
    "2": {
      "2": {
        "20": {
          "e": 7,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 60
        },
        "e": 7,
        "t": 1,
        "JP": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 60
      },
      "3": {
        "22": {
          "e": 3,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 30
        },
        "e": 3,
        "t": 1,
        "DE": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 30
      },
      "4": {
        "18": {
          "e": 3,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 30
        },
        "e": 3,
        "t": 1,
        "GB": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 30
      },
      "5": {
        "10": {
          "e": 1,
          "t": 1,
          "n": 1,
          "u": 1
        },
        "11": {
          "e": 2,
          "d": 30
        },
        "e": 3,
        "t": 1,
        "JP": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 30
      },
      "10": {
        "10": {
          "e": 3,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 30
        },
        "e": 3,
        "t": 1,
        "GB": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 30
      },
      "13": {
        "8": {
          "e": 5,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 30
        },
        "e": 5,
        "t": 1,
        "US": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 30,
        "ds": {
          "1": 1
        }
      },
      "17": {
        "0": {
          "e": 6,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 30
        },
        "e": 6,
        "t": 1,
        "US": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 30
      },
      "20": {
        "2": {
          "e": 10,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 60
        },
        "e": 10,
        "t": 1,
        "US": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 1,
        "u": 1,
        "f": {
          "0": 1
        },
        "l": {
          "0": 1
        },
        "d": 60,
        "ds": {
          "2": 1
        }
      },
      "23": {
        "9": {
          "e": 6,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 60
        },
        "10": {
          "e": 7,
          "t": 1,
          "n": 1,
          "u": 1,
          "d": 30
        },
        "e": 13,
        "t": 2,
        "Unknown": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "n": 2,
        "u": 2,
        "f": {
          "0": 2
        },
        "l": {
          "0": 2
        },
        "JP": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "d": 90,
        "ds": {
          "1": 1,
          "2": 1
        }
      },
      "u": 10,
      "Unknown": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "f": {
        "0": 10
      },
      "l": {
        "0": 10
      },
      "JP": {
        "u": 3,
        "t": 3,
        "n": 3
      },
      "GB": {
        "u": 2,
        "t": 2,
        "n": 2
      },
      "US": {
        "u": 3,
        "t": 3,
        "n": 3
      },
      "DE": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "ds": {
        "1": 2,
        "2": 2
      },
      "e": 53,
      "t": 10,
      "n": 10,
      "d": 390
    },
    "u": 10,
    "w8": {
      "u": 3,
      "Unknown": {
        "u": 1
      },
      "f": {
        "0": 3
      },
      "l": {
        "0": 3
      },
      "JP": {
        "u": 1
      },
      "US": {
        "u": 1
      },
      "ds": {
        "1": 1,
        "2": 2
      }
    },
    "Unknown": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "f": {
      "0": 10
    },
    "l": {
      "0": 10
    },
    "JP": {
      "u": 3,
      "t": 3,
      "n": 3
    },
    "w5": {
      "u": 3,
      "JP": {
        "u": 1
      },
      "f": {
        "0": 3
      },
      "l": {
        "0": 3
      },
      "DE": {
        "u": 1
      },
      "GB": {
        "u": 1
      }
    },
    "w6": {
      "u": 2,
      "GB": {
        "u": 1
      },
      "f": {
        "0": 2
      },
      "l": {
        "0": 2
      },
      "JP": {
        "u": 1
      }
    },
    "GB": {
      "u": 2,
      "t": 2,
      "n": 2
    },
    "US": {
      "u": 3,
      "t": 3,
      "n": 3
    },
    "w7": {
      "u": 2,
      "US": {
        "u": 2
      },
      "f": {
        "0": 2
      },
      "l": {
        "0": 2
      },
      "ds": {
        "1": 1
      }
    },
    "DE": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "ds": {
      "1": 2,
      "2": 2
    },
    "e": 53,
    "t": 10,
    "n": 10,
    "d": 390
  },
  "meta": {
    "f-ranges": [
      "0"
    ],
    "l-ranges": [
      "0"
    ],
    "countries": [
      "Unknown",
      "JP",
      "GB",
      "US",
      "DE"
    ],
    "d-ranges": [
      "1",
      "2"
    ]
  }
}

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

period
string

For which time period to provide data, possible values (month, 60days, 30days, 7days, yesterday, hour or [startMiliseconds, endMiliseconds] as [1417730400000,1420149600000])

callback
string

(optional) name of callback function for JSONP output

 

Retrieves the raw users data of the app, the object is divided by time metrics, like year, month, date and can be processed by Countly JavaScript libraries
e - events or requests sent to server

n - new sessions

t - total sessions

u - unique locations

d - total session duration

ds - durations (counts)

f - frequency

l - loyalty

Suggest Edits

/o?method=devices

Retrieve devices information of the app

 
gethttps://try.count.ly/o?method=devices&api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o?app_id=app_id&api_key=api_key&method=devices'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o',
  qs: { app_id: 'app_id', api_key: 'api_key', method: 'devices' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o?app_id=app_id&api_key=api_key&method=devices")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o?app_id=app_id&api_key=api_key&method=devices");

xhr.send(data);
import requests

url = "https://try.count.ly/o"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "2015": {
    "2": {
      "2": {
        "Fire Phone": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "3": {
        "iPhone 6": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "4": {
        "iPhone 5C": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "5": {
        "One S": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "10": {
        "One Touch Idol X": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "13": {
        "Optimus L5": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "17": {
        "iPhone Mini": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "20": {
        "iPhone 5C": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "23": {
        "iPhone 5": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "iPhone 5C": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "iPhone 5": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "Fire Phone": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "One S": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "iPhone 5C": {
        "u": 3,
        "t": 3,
        "n": 3
      },
      "One Touch Idol X": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "Optimus L5": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "iPhone 6": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "iPhone Mini": {
        "u": 1,
        "t": 1,
        "n": 1
      }
    },
    "iPhone 5": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "w8": {
      "iPhone 5": {
        "u": 1
      },
      "iPhone 5C": {
        "u": 2
      }
    },
    "Fire Phone": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "w5": {
      "Fire Phone": {
        "u": 1
      },
      "iPhone 6": {
        "u": 1
      },
      "iPhone 5C": {
        "u": 1
      }
    },
    "One S": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "w6": {
      "One S": {
        "u": 1
      },
      "One Touch Idol X": {
        "u": 1
      }
    },
    "iPhone 5C": {
      "u": 3,
      "t": 3,
      "n": 3
    },
    "One Touch Idol X": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "Optimus L5": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "w7": {
      "Optimus L5": {
        "u": 1
      },
      "iPhone Mini": {
        "u": 1
      }
    },
    "iPhone 6": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "iPhone Mini": {
      "u": 1,
      "t": 1,
      "n": 1
    }
  },
  "meta": {
    "devices": [
      "iPhone 5",
      "Fire Phone",
      "One S",
      "iPhone 5C",
      "One Touch Idol X",
      "Optimus L5",
      "iPhone 6",
      "iPhone Mini"
    ]
  }
}

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

period
string

For which time period to provide data, possible values (month, 60days, 30days, 7days, yesterday, hour or [startMiliseconds, endMiliseconds] as [1417730400000,1420149600000])

callback
string

(optional) name of callback function for JSONP output

 

Retrieves the raw devices data of the app, the object is divided by time metrics, like year, month, date and can be processed by Countly JavaScript libraries
n - new devices
t - total devices
u - unique devices

Suggest Edits

/o?method=device_details

Retrieve device details data of the app

 
gethttps://try.count.ly/o?method=device_details&api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o?app_id=app_id&api_key=api_key&method=device_details'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o',
  qs: 
   { app_id: 'app_id',
     api_key: 'api_key',
     method: 'device_details' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o?app_id=app_id&api_key=api_key&method=device_details")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o?app_id=app_id&api_key=api_key&method=device_details");

xhr.send(data);
import requests

url = "https://try.count.ly/o"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "2015": {
    "2": {
      "2": {
        "3:1": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "Android": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "a2:3": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "640x1136": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "3": {
        "2:1": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "iOS": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "i4:1": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "600x800": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "4": {
        "2:5": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "iOS": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "i4:0": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "720x1280": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "5": {
        "1:7": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "Android": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "a6:0": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "1080x1920": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "10": {
        "2:4": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "Android": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "a7:1": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "360x640": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "13": {
        "3:1": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "Android": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "a4:3": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "360x640": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "17": {
        "3:2": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "iOS": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "i6:1": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "360x640": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "20": {
        "2:9": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "Android": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "a4:0": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "1536x2048": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "23": {
        "2:1": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "Windows Phone": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "w4:2": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "480x800": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "2:8": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "Android": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "a4:1": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "240x400": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "2:1": {
        "u": 2,
        "t": 2,
        "n": 2
      },
      "Windows Phone": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "w4:2": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "480x800": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "3:1": {
        "u": 2,
        "t": 2,
        "n": 2
      },
      "Android": {
        "u": 6,
        "t": 6,
        "n": 6
      },
      "a2:3": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "640x1136": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "2:9": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "a4:0": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "1536x2048": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "2:8": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "a4:1": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "240x400": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "2:4": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "a7:1": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "360x640": {
        "u": 3,
        "t": 3,
        "n": 3
      },
      "a4:3": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "1:7": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "a6:0": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "1080x1920": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "iOS": {
        "u": 3,
        "t": 3,
        "n": 3
      },
      "i4:1": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "600x800": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "3:2": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "i6:1": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "2:5": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "i4:0": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "720x1280": {
        "u": 1,
        "t": 1,
        "n": 1
      }
    },
    "2:1": {
      "u": 2,
      "t": 2,
      "n": 2
    },
    "w8": {
      "2:1": {
        "u": 1
      },
      "Windows Phone": {
        "u": 1
      },
      "w4:2": {
        "u": 1
      },
      "480x800": {
        "u": 1
      },
      "2:9": {
        "u": 1
      },
      "Android": {
        "u": 2
      },
      "a4:0": {
        "u": 1
      },
      "1536x2048": {
        "u": 1
      },
      "2:8": {
        "u": 1
      },
      "a4:1": {
        "u": 1
      },
      "240x400": {
        "u": 1
      }
    },
    "Windows Phone": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "w4:2": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "480x800": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "3:1": {
      "u": 2,
      "t": 2,
      "n": 2
    },
    "w5": {
      "3:1": {
        "u": 1
      },
      "Android": {
        "u": 1
      },
      "a2:3": {
        "u": 1
      },
      "640x1136": {
        "u": 1
      },
      "2:1": {
        "u": 1
      },
      "iOS": {
        "u": 2
      },
      "i4:1": {
        "u": 1
      },
      "600x800": {
        "u": 1
      },
      "2:5": {
        "u": 1
      },
      "i4:0": {
        "u": 1
      },
      "720x1280": {
        "u": 1
      }
    },
    "Android": {
      "u": 6,
      "t": 6,
      "n": 6
    },
    "a2:3": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "640x1136": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "2:9": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "a4:0": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "1536x2048": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "2:8": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "a4:1": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "240x400": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "2:4": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "w6": {
      "2:4": {
        "u": 1
      },
      "Android": {
        "u": 2
      },
      "a7:1": {
        "u": 1
      },
      "360x640": {
        "u": 1
      },
      "1:7": {
        "u": 1
      },
      "a6:0": {
        "u": 1
      },
      "1080x1920": {
        "u": 1
      }
    },
    "a7:1": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "360x640": {
      "u": 3,
      "t": 3,
      "n": 3
    },
    "w7": {
      "3:1": {
        "u": 1
      },
      "Android": {
        "u": 1
      },
      "a4:3": {
        "u": 1
      },
      "360x640": {
        "u": 2
      },
      "3:2": {
        "u": 1
      },
      "iOS": {
        "u": 1
      },
      "i6:1": {
        "u": 1
      }
    },
    "a4:3": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "1:7": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "a6:0": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "1080x1920": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "iOS": {
      "u": 3,
      "t": 3,
      "n": 3
    },
    "i4:1": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "600x800": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "3:2": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "i6:1": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "2:5": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "i4:0": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "720x1280": {
      "u": 1,
      "t": 1,
      "n": 1
    }
  },
  "meta": {
    "app_versions": [
      "2:1",
      "3:1",
      "2:9",
      "2:8",
      "2:4",
      "1:7",
      "3:2",
      "2:5"
    ],
    "os": [
      "Windows Phone",
      "Android",
      "iOS"
    ],
    "os_versions": [
      "w4:2",
      "a2:3",
      "a4:0",
      "a4:1",
      "a7:1",
      "a4:3",
      "a6:0",
      "i4:1",
      "i6:1",
      "i4:0"
    ],
    "resolutions": [
      "480x800",
      "640x1136",
      "1536x2048",
      "240x400",
      "360x640",
      "1080x1920",
      "600x800",
      "720x1280"
    ]
  }
}

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

period
string

For which time period to provide data, possible values (month, 60days, 30days, 7days, yesterday, hour or [startMiliseconds, endMiliseconds] as [1417730400000,1420149600000])

callback
string

(optional) name of callback function for JSONP output

 

Retrieves the raw device details data of the app segmented by display resolutions, display densities, os, os versions and app versions. The object is divided by time metrics, like year, month, date and can be processed by Countly JavaScript libraries

n - new instances

t - total instances

u - unique instances

Due to MongoDB inability to use key names that contain dots, all dots are replace by colons ":". So 1.2 becomes 1:2.

To differentiate platform versions, each platform version is formed by using first letter of platform name and version, so Windows 8.1 becomes w8:1

Suggest Edits

/o?method=carriers

Retrieve carriers of the app

 
gethttps://try.count.ly/o?method=carriers&api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o?app_id=app_id&api_key=api_key&method=carriers'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o',
  qs: { app_id: 'app_id', api_key: 'api_key', method: 'carriers' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o?app_id=app_id&api_key=api_key&method=carriers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o?app_id=app_id&api_key=api_key&method=carriers");

xhr.send(data);
import requests

url = "https://try.count.ly/o"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "2015": {
    "2": {
      "2": {
        "Sprint": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "3": {
        "Verizon": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "4": {
        "Tele2": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "5": {
        "Rogers Wireless": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "10": {
        "\tAt&t": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "13": {
        "Vodafone": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "17": {
        "Bell Canada": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "20": {
        "Verizon": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "23": {
        "Rogers Wireless": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "Cricket Communications": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "Rogers Wireless": {
        "u": 2,
        "t": 2,
        "n": 2
      },
      "Cricket Communications": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "Verizon": {
        "u": 2,
        "t": 2,
        "n": 2
      },
      "Sprint": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "\tAt&t": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "Vodafone": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "Bell Canada": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "Tele2": {
        "u": 1,
        "t": 1,
        "n": 1
      }
    },
    "Rogers Wireless": {
      "u": 2,
      "t": 2,
      "n": 2
    },
    "w8": {
      "Rogers Wireless": {
        "u": 1
      },
      "Cricket Communications": {
        "u": 1
      },
      "Verizon": {
        "u": 1
      }
    },
    "Cricket Communications": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "Verizon": {
      "u": 2,
      "t": 2,
      "n": 2
    },
    "Sprint": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "w5": {
      "Sprint": {
        "u": 1
      },
      "Verizon": {
        "u": 1
      },
      "Tele2": {
        "u": 1
      }
    },
    "\tAt&t": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "w6": {
      "\tAt&t": {
        "u": 1
      },
      "Rogers Wireless": {
        "u": 1
      }
    },
    "Vodafone": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "w7": {
      "Vodafone": {
        "u": 1
      },
      "Bell Canada": {
        "u": 1
      }
    },
    "Bell Canada": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "Tele2": {
      "u": 1,
      "t": 1,
      "n": 1
    }
  },
  "meta": {
    "carriers": [
      "Rogers Wireless",
      "Cricket Communications",
      "Verizon",
      "Sprint",
      "\tAt&t",
      "Vodafone",
      "Bell Canada",
      "Tele2"
    ]
  }
}

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

period
string

For which time period to provide data, possible values (month, 60days, 30days, 7days, yesterday, hour or [startMiliseconds, endMiliseconds] as [1417730400000,1420149600000])

callback
string

(optional) name of callback function for JSONP output

 

Retrieves the raw carriers data of the app, the object is divided by time metrics, like year, month, date and can be processed by Countly JavaScript libraries
n - new carries
t - total carries
u - unique carriers

Suggest Edits

/o?method=app_versions

Retrieve app versions data of the app

 
gethttps://try.count.ly/o?method=app_versions&api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o?app_id=app_id&api_key=api_key&method=app_versions'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o',
  qs: { app_id: 'app_id', api_key: 'api_key', method: 'app_versions' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o?app_id=app_id&api_key=api_key&method=app_versions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o?app_id=app_id&api_key=api_key&method=app_versions");

xhr.send(data);
import requests

url = "https://try.count.ly/o"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "2015": {
    "2": {
      "2": {
        "3:1": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "Android": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "a2:3": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "640x1136": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "3": {
        "2:1": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "iOS": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "i4:1": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "600x800": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "4": {
        "2:5": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "iOS": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "i4:0": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "720x1280": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "5": {
        "1:7": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "Android": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "a6:0": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "1080x1920": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "10": {
        "2:4": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "Android": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "a7:1": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "360x640": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "13": {
        "3:1": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "Android": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "a4:3": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "360x640": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "17": {
        "3:2": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "iOS": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "i6:1": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "360x640": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "20": {
        "2:9": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "Android": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "a4:0": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "1536x2048": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "23": {
        "2:1": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "Windows Phone": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "w4:2": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "480x800": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "2:8": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "Android": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "a4:1": {
          "t": 1,
          "n": 1,
          "u": 1
        },
        "240x400": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "2:1": {
        "u": 2,
        "t": 2,
        "n": 2
      },
      "Windows Phone": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "w4:2": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "480x800": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "3:1": {
        "u": 2,
        "t": 2,
        "n": 2
      },
      "Android": {
        "u": 6,
        "t": 6,
        "n": 6
      },
      "a2:3": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "640x1136": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "2:9": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "a4:0": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "1536x2048": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "2:8": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "a4:1": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "240x400": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "2:4": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "a7:1": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "360x640": {
        "u": 3,
        "t": 3,
        "n": 3
      },
      "a4:3": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "1:7": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "a6:0": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "1080x1920": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "iOS": {
        "u": 3,
        "t": 3,
        "n": 3
      },
      "i4:1": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "600x800": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "3:2": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "i6:1": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "2:5": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "i4:0": {
        "u": 1,
        "t": 1,
        "n": 1
      },
      "720x1280": {
        "u": 1,
        "t": 1,
        "n": 1
      }
    },
    "2:1": {
      "u": 2,
      "t": 2,
      "n": 2
    },
    "w8": {
      "2:1": {
        "u": 1
      },
      "Windows Phone": {
        "u": 1
      },
      "w4:2": {
        "u": 1
      },
      "480x800": {
        "u": 1
      },
      "2:9": {
        "u": 1
      },
      "Android": {
        "u": 2
      },
      "a4:0": {
        "u": 1
      },
      "1536x2048": {
        "u": 1
      },
      "2:8": {
        "u": 1
      },
      "a4:1": {
        "u": 1
      },
      "240x400": {
        "u": 1
      }
    },
    "Windows Phone": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "w4:2": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "480x800": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "3:1": {
      "u": 2,
      "t": 2,
      "n": 2
    },
    "w5": {
      "3:1": {
        "u": 1
      },
      "Android": {
        "u": 1
      },
      "a2:3": {
        "u": 1
      },
      "640x1136": {
        "u": 1
      },
      "2:1": {
        "u": 1
      },
      "iOS": {
        "u": 2
      },
      "i4:1": {
        "u": 1
      },
      "600x800": {
        "u": 1
      },
      "2:5": {
        "u": 1
      },
      "i4:0": {
        "u": 1
      },
      "720x1280": {
        "u": 1
      }
    },
    "Android": {
      "u": 6,
      "t": 6,
      "n": 6
    },
    "a2:3": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "640x1136": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "2:9": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "a4:0": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "1536x2048": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "2:8": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "a4:1": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "240x400": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "2:4": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "w6": {
      "2:4": {
        "u": 1
      },
      "Android": {
        "u": 2
      },
      "a7:1": {
        "u": 1
      },
      "360x640": {
        "u": 1
      },
      "1:7": {
        "u": 1
      },
      "a6:0": {
        "u": 1
      },
      "1080x1920": {
        "u": 1
      }
    },
    "a7:1": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "360x640": {
      "u": 3,
      "t": 3,
      "n": 3
    },
    "w7": {
      "3:1": {
        "u": 1
      },
      "Android": {
        "u": 1
      },
      "a4:3": {
        "u": 1
      },
      "360x640": {
        "u": 2
      },
      "3:2": {
        "u": 1
      },
      "iOS": {
        "u": 1
      },
      "i6:1": {
        "u": 1
      }
    },
    "a4:3": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "1:7": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "a6:0": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "1080x1920": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "iOS": {
      "u": 3,
      "t": 3,
      "n": 3
    },
    "i4:1": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "600x800": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "3:2": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "i6:1": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "2:5": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "i4:0": {
      "u": 1,
      "t": 1,
      "n": 1
    },
    "720x1280": {
      "u": 1,
      "t": 1,
      "n": 1
    }
  },
  "meta": {
    "app_versions": [
      "2:1",
      "3:1",
      "2:9",
      "2:8",
      "2:4",
      "1:7",
      "3:2",
      "2:5"
    ],
    "os": [
      "Windows Phone",
      "Android",
      "iOS"
    ],
    "os_versions": [
      "w4:2",
      "a2:3",
      "a4:0",
      "a4:1",
      "a7:1",
      "a4:3",
      "a6:0",
      "i4:1",
      "i6:1",
      "i4:0"
    ],
    "resolutions": [
      "480x800",
      "640x1136",
      "1536x2048",
      "240x400",
      "360x640",
      "1080x1920",
      "600x800",
      "720x1280"
    ]
  }
}

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

period
string

For which time period to provide data, possible values (month, 60days, 30days, 7days, yesterday, hour or [startMiliseconds, endMiliseconds] as [1417730400000,1420149600000])

callback
string

(optional) name of callback function for JSONP output

 

Retrieves the raw device details data of the app (including app version), the object is divided by time metrics, like year, month, date and can be processed by Countly JavaScript libraries

n - new app version instances

t - total app version instances

u - unique app version instances

Note that app version names are modified per MongoDB inability to use dots in key names, so all dots in app version are replaces by colon ":"

Suggest Edits

/o?method=cities

Retrieve city locations of the app

 
gethttps://try.count.ly/o?method=cities&api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o?app_id=app_id&api_key=api_key&method=cities'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o',
  qs: { app_id: 'app_id', api_key: 'api_key', method: 'cities' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o?app_id=app_id&api_key=api_key&method=cities")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o?app_id=app_id&api_key=api_key&method=cities");

xhr.send(data);
import requests

url = "https://try.count.ly/o"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "2015": {
    "1": {
      "Unknown": {
        "u": 1
      },
      "Klaukkala": {
        "u": 1
      },
      "Tammela": {
        "u": 1
      }
    },
    "2": {
      "5": {
        "Unknown": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "12": {
        "Unknown": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "16": {
        "Unknown": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "22": {
        "Unknown": {
          "t": 1,
          "n": 1,
          "u": 1
        }
      },
      "Unknown": {
        "u": 4,
        "t": 4,
        "n": 4
      }
    },
    "Unknown": {
      "u": 5,
      "t": 4,
      "n": 4
    },
    "w4": {
      "Unknown": {
        "u": 1
      },
      "Tammela": {
        "u": 1
      }
    },
    "Klaukkala": {
      "u": 1
    },
    "w5": {
      "Klaukkala": {
        "u": 1
      }
    },
    "w6": {
      "Unknown": {
        "u": 1
      }
    },
    "w7": {
      "Unknown": {
        "u": 2
      }
    },
    "w8": {
      "Unknown": {
        "u": 1
      }
    },
    "Tammela": {
      "u": 1
    }
  },
  "meta": {
    "cities": [
      "Unknown",
      "Klaukkala",
      "Tammela"
    ]
  }
}

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

period
string

For which time period to provide data, possible values (month, 60days, 30days, 7days, yesterday, hour or [startMiliseconds, endMiliseconds] as [1417730400000,1420149600000])

callback
string

(optional) name of callback function for JSONP output

 

Retrieves the raw city location data of the app, the object is divided by time metrics, like year, month, date and can be processed by Countly JavaScript libraries
Note: that you must enable collecting city data, by setting city_data to true in /api/config.js
n - new cities
t - total cities
u - unique cities

Suggest Edits

/o?method=events

Retrieve events of the app

 
gethttps://try.count.ly/o?method=events&api_key=api_key&app_id=app_id&event=event
curl --request GET \
  --url 'https://try.count.ly/o?event=event&app_id=app_id&api_key=api_key&method=events'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o',
  qs: 
   { event: 'event',
     app_id: 'app_id',
     api_key: 'api_key',
     method: 'events' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o?event=event&app_id=app_id&api_key=api_key&method=events")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o?event=event&app_id=app_id&api_key=api_key&method=events");

xhr.send(data);
import requests

url = "https://try.count.ly/o"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "2015": {
    "2": {
      "2": {
        "20": {
          "c": 1
        },
        "c": 1
      },
      "17": {
        "0": {
          "c": 1
        },
        "c": 1
      },
      "23": {
        "9": {
          "c": 1
        },
        "c": 1
      },
      "c": 3
    },
    "c": 3
  },
  "meta": {
    "level": [
      "[CLY]3",
      "[CLY]7",
      "[CLY]9"
    ],
    "segments": [
      "level",
      "mode",
      "difficulty"
    ],
    "mode": [
      "physics",
      "story"
    ],
    "difficulty": [
      "easy",
      "hard"
    ]
  }
}
{
  "2015": {
    "2": {
      "2": {
        "easy": {
          "c": 1
        }
      },
      "17": {
        "hard": {
          "c": 1
        }
      },
      "23": {
        "hard": {
          "c": 1
        }
      },
      "easy": {
        "c": 1
      },
      "hard": {
        "c": 2
      }
    },
    "easy": {
      "c": 1
    },
    "hard": {
      "c": 2
    }
  },
  "meta": {
    "level": [
      "[CLY]3",
      "[CLY]7",
      "[CLY]9"
    ],
    "segments": [
      "level",
      "mode",
      "difficulty"
    ],
    "mode": [
      "physics",
      "story"
    ],
    "difficulty": [
      "easy",
      "hard"
    ]
  }
}

Path Params

api_key
string
required

API_KEY of user, with permission to access this app

app_id
string
required

ID of the app for which to query

event
string
required

(optional) Name of event for which to retrieve data, if not provided will return data for first event ever occured

Query Params

period
string

For which time period to provide data, possible values (month, 60days, 30days, 7days, yesterday, hour or [startMiliseconds, endMiliseconds] as [1417730400000,1420149600000])

events
string

(optional) JSON array as string, where you may provide multiple event names and will return merged data of all these events

callback
string

(optional) name of callback function for JSONP output

segmentation
string

(optional) Fetch data for specific segmentation of event

 

Retrieves the raw event data of the app segmented by provided event segmentation. The object is divided by time metrics, like year, month, date and can be processed by Countly JavaScript libraries
c - total count
s - total sum

Suggest Edits

/o?method=get_events

Retrieve list of events of the app

 
gethttps://try.count.ly/o?method=get_events&api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o?app_id=app_id&api_key=api_key&method=get_events'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o',
  qs: 
   { app_id: 'app_id',
     api_key: 'api_key',
     method: 'get_events' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o?app_id=app_id&api_key=api_key&method=get_events")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o?app_id=app_id&api_key=api_key&method=get_events");

xhr.send(data);
import requests

url = "https://try.count.ly/o"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "_id": "542bad58b3bced1a67000003",
    "list": [
        "test",
        "test1",
        "test2"
    ],
    "segments": {
      	"test1": [
            "version",
            "country",
            "market"
        ],
      	"test2":[
            "country",
            "market"
        ]
    ]
}

Path Params

api_key
string
required

API_KEY of user, with permission to access this app

app_id
string
required

ID of the app for which to query

Query Params

callback
string

(optional) name of callback function for JSONP output

action
string

(optional) Only acceptable value is refresh, which will return only data for today

 

Retrieves the list of events and segments of the app

Suggest Edits

/o?method=get_period_obj

Get information about period object selected in dashboard

 
gethttps://try.count.ly/o?method=get_period_obj&api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o?app_id=app_id&api_key=api_key&method=get_period_obj'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o',
  qs: 
   { app_id: 'app_id',
     api_key: 'api_key',
     method: 'get_period_obj' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o?app_id=app_id&api_key=api_key&method=get_period_obj")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o?app_id=app_id&api_key=api_key&method=get_period_obj");

xhr.send(data);
import requests

url = "https://try.count.ly/o"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "activePeriod": 2015,
  "periodMax": 3,
  "periodMin": 1,
  "previousPeriod": 2014,
  "currentPeriodArr": [
    "2015.1.1",
    "2015.1.2",
    "2015.1.3",
    "2015.1.4",
    "2015.1.5",
    "2015.1.6",
    "2015.1.7",
    "2015.1.8",
    "2015.1.9",
    "2015.1.10",
    "2015.1.11",
    "2015.1.12",
    "2015.1.13",
    "2015.1.14",
    "2015.1.15",
    "2015.1.16",
    "2015.1.17",
    "2015.1.18",
    "2015.1.19",
    "2015.1.20",
    "2015.1.21",
    "2015.1.22",
    "2015.1.23",
    "2015.1.24",
    "2015.1.25",
    "2015.1.26",
    "2015.1.27",
    "2015.1.28",
    "2015.1.29",
    "2015.1.30",
    "2015.1.31",
    "2015.2.1",
    "2015.2.2",
    "2015.2.3",
    "2015.2.4",
    "2015.2.5",
    "2015.2.6",
    "2015.2.7",
    "2015.2.8",
    "2015.2.9",
    "2015.2.10",
    "2015.2.11",
    "2015.2.12",
    "2015.2.13",
    "2015.2.14",
    "2015.2.15",
    "2015.2.16",
    "2015.2.17",
    "2015.2.18",
    "2015.2.19",
    "2015.2.20",
    "2015.2.21",
    "2015.2.22",
    "2015.2.23",
    "2015.2.24",
    "2015.2.25",
    "2015.2.26",
    "2015.2.27",
    "2015.2.28",
    "2015.3.1",
    "2015.3.2",
    "2015.3.3",
    "2015.3.4"
  ],
  "previousPeriodArr": [
    "2013.12.31",
    "2014.1.1",
    "2014.1.2",
    "2014.1.3",
    "2014.1.4",
    "2014.1.5",
    "2014.1.6",
    "2014.1.7",
    "2014.1.8",
    "2014.1.9",
    "2014.1.10",
    "2014.1.11",
    "2014.1.12",
    "2014.1.13",
    "2014.1.14",
    "2014.1.15",
    "2014.1.16",
    "2014.1.17",
    "2014.1.18",
    "2014.1.19",
    "2014.1.20",
    "2014.1.21",
    "2014.1.22",
    "2014.1.23",
    "2014.1.24",
    "2014.1.25",
    "2014.1.26",
    "2014.1.27",
    "2014.1.28",
    "2014.1.29",
    "2014.1.30",
    "2014.1.31",
    "2014.2.1",
    "2014.2.2",
    "2014.2.3",
    "2014.2.4",
    "2014.2.5",
    "2014.2.6",
    "2014.2.7",
    "2014.2.8",
    "2014.2.9",
    "2014.2.10",
    "2014.2.11",
    "2014.2.12",
    "2014.2.13",
    "2014.2.14",
    "2014.2.15",
    "2014.2.16",
    "2014.2.17",
    "2014.2.18",
    "2014.2.19",
    "2014.2.20",
    "2014.2.21",
    "2014.2.22",
    "2014.2.23",
    "2014.2.24",
    "2014.2.25",
    "2014.2.26",
    "2014.2.27",
    "2014.2.28",
    "2014.3.1",
    "2014.3.2",
    "2014.3.3"
  ],
  "uniquePeriodArr": [],
  "uniquePeriodCheckArr": [],
  "previousUniquePeriodArr": [],
  "previousUniquePeriodCheckArr": [],
  "dateString": "MMM",
  "daysInPeriod": 63,
  "isSpecialPeriod": false,
  "reqMonthDbDateIds": [
    "2013:12",
    "2014:1",
    "2014:2",
    "2014:3",
    "2015:1",
    "2015:2",
    "2015:3"
  ],
  "reqZeroDbDateIds": [
    "2013:0",
    "2014:0",
    "2015:0"
  ]
}

Path Params

api_key
string
required

API_KEY of user, with permission to access this app

app_id
string
required

ID of the app for which to query

Query Params

callback
string

(optional) name of callback function for JSONP output

period
string

For which time period to generate, possible values (month, 60days, 30days, 7days, yesterday, hour or [startMiliseconds, endMiliseconds] as [1417730400000,1420149600000])

 

Retrieve data about periods

Suggest Edits

/o?method=total_users

Retrieve current user breakdown by metric

 
gethttps://try.count.ly/o?method=total_users&api_key=api_key&app_id=app_id&metric=metric
curl --request GET \
  --url 'https://try.count.ly/o?metric=metric&app_id=app_id&api_key=api_key&method=total_users'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o',
  qs: 
   { metric: 'metric',
     app_id: 'app_id',
     api_key: 'api_key',
     method: 'total_users' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o?metric=metric&app_id=app_id&api_key=api_key&method=total_users")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o?metric=metric&app_id=app_id&api_key=api_key&method=total_users");

xhr.send(data);
import requests

url = "https://try.count.ly/o"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

[  
   {  
      "_id":"GH",
      "u":1
   },
   {  
      "_id":"DZ",
      "u":1
   },
   {  
      "_id":"BG",
      "u":2
   },
   {  
      "_id":"DJ",
      "u":1
   },
   {  
      "_id":"SV",
      "u":1
   },
   {  
      "_id":"SI",
      "u":2
   },
   {  
      "_id":"SA",
      "u":2
   },
   {  
      "_id":"LV",
      "u":1
   },
   {  
      "_id":"MY",
      "u":2
   },
   {  
      "_id":"DK",
      "u":5
   },
   {  
      "_id":"EE",
      "u":3
   },
   {  
      "_id":"VI",
      "u":1
   },
   {  
      "_id":"SY",
      "u":3
   },
   {  
      "_id":"CR",
      "u":4
   },
   {  
      "_id":"NG",
      "u":2
   },
   {  
      "_id":"VE",
      "u":2
   },
   {  
      "_id":"PA",
      "u":2
   },
   {  
      "_id":"BE",
      "u":16
   },
   {  
      "_id":"BZ",
      "u":1
   },
   {  
      "_id":"NL",
      "u":23
   },
   {  
      "_id":"TR",
      "u":7
   },
   {  
      "_id":"FJ",
      "u":1
   },
   {  
      "_id":"GB",
      "u":76
   },
   {  
      "_id":"US",
      "u":747
   },
   {  
      "_id":"AR",
      "u":5
   },
   {  
      "_id":"ZA",
      "u":17
   },
   {  
      "_id":"TJ",
      "u":1
   },
   {  
      "_id":"SE",
      "u":17
   },
   {  
      "_id":"PE",
      "u":2
   },
   {  
      "_id":"Unknown",
      "u":364
   },
   {  
      "_id":"CL",
      "u":6
   },
   {  
      "_id":"SG",
      "u":3
   },
   {  
      "_id":"HN",
      "u":1
   },
   {  
      "_id":"IR",
      "u":13
   },
   {  
      "_id":"CA",
      "u":40
   },
   {  
      "_id":"AU",
      "u":25
   },
   {  
      "_id":"NA",
      "u":2
   },
   {  
      "_id":"BR",
      "u":46
   },
   {  
      "_id":"PL",
      "u":5
   },
   {  
      "_id":"AE",
      "u":4
   },
   {  
      "_id":"KE",
      "u":4
   },
   {  
      "_id":"JP",
      "u":129
   },
   {  
      "_id":"DE",
      "u":62
   },
   {  
      "_id":"A2",
      "u":1
   },
   {  
      "_id":"KR",
      "u":57
   },
   {  
      "_id":"IT",
      "u":20
   },
   {  
      "_id":"HK",
      "u":4
   },
   {  
      "_id":"MA",
      "u":6
   },
   {  
      "_id":"SD",
      "u":2
   },
   {  
      "_id":"LK",
      "u":1
   },
   {  
      "_id":"FR",
      "u":46
   },
   {  
      "_id":"IN",
      "u":13
   },
   {  
      "_id":"RO",
      "u":5
   },
   {  
      "_id":"EG",
      "u":13
   },
   {  
      "_id":"TN",
      "u":5
   },
   {  
      "_id":"PT",
      "u":5
   },
   {  
      "_id":"MX",
      "u":16
   },
   {  
      "_id":"TW",
      "u":26
   },
   {  
      "_id":"MD",
      "u":1
   },
   {  
      "_id":"AT",
      "u":4
   },
   {  
      "_id":"BH",
      "u":1
   },
   {  
      "_id":"CI",
      "u":1
   },
   {  
      "_id":"CH",
      "u":13
   },
   {  
      "_id":"CZ",
      "u":6
   },
   {  
      "_id":"PH",
      "u":3
   },
   {  
      "_id":"CN",
      "u":174
   },
   {  
      "_id":"ES",
      "u":10
   },
   {  
      "_id":"UA",
      "u":12
   },
   {  
      "_id":"FI",
      "u":10
   },
   {  
      "_id":"PF",
      "u":1
   },
   {  
      "_id":"RU",
      "u":17
   },
   {  
      "_id":"ID",
      "u":15
   },
   {  
      "_id":"CO",
      "u":9
   },
   {  
      "_id":"TH",
      "u":4
   },
   {  
      "_id":"IL",
      "u":3
   },
   {  
      "_id":"VN",
      "u":9
   },
   {  
      "_id":"NO",
      "u":11
   },
   {  
      "_id":"KZ",
      "u":2
   },
   {  
      "_id":"IE",
      "u":5
   },
   {  
      "_id":"GR",
      "u":1
   },
   {  
      "_id":"NZ",
      "u":1
   },
   {  
      "_id":"BY",
      "u":1
   }
]
[  
   {  
      "_id":"users",
      "u":2024
   }
]

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

metric
string

Metric for which to fetch current user data

callback
string

(optional) name of callback function for JSONP output

 

The data retrieved is current segmentation of users by provided metric. Mostly used to correct estimation, this api can also be used simply to get breakdown of current users by provided segment

Suggest Edits

/o/analytics/dashboard

Retrieve analytics data for dashboard

 
gethttps://try.count.ly/o/analytics/dashboard?api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o/analytics/dashboard?app_id=app_id&api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o/analytics/dashboard',
  qs: 
   { app_id: 'app_id',
     api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o/analytics/dashboard?app_id=app_id&api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o/analytics/dashboard?app_id=app_id&api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/o/analytics/dashboard"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "30days": {
    "dashboard": {
      "total_sessions": {
        "total": 10,
        "change": "NA",
        "trend": "u"
      },
      "total_users": {
        "total": 10,
        "change": "NA",
        "trend": "u",
        "is_estimate": true
      },
      "new_users": {
        "total": 10,
        "change": "NA",
        "trend": "u"
      },
      "total_time": {
        "total": "6.5 min",
        "change": "NA",
        "trend": "u"
      },
      "avg_time": {
        "total": "0.7 min",
        "change": "NA",
        "trend": "u"
      },
      "avg_requests": {
        "total": "5.3",
        "change": "NA",
        "trend": "u"
      }
    },
    "top": {
      "platforms": [
        {
          "name": "Android",
          "percent": 60
        },
        {
          "name": "iOS",
          "percent": 30
        },
        {
          "name": "Windows Phone",
          "percent": 10
        }
      ],
      "resolutions": [
        {
          "name": "360x640",
          "percent": 60
        },
        {
          "name": "480x800",
          "percent": 20
        },
        {
          "name": "640x1136",
          "percent": 20
        }
      ],
      "carriers": [
        {
          "name": "Rogers Wireless",
          "percent": 40
        },
        {
          "name": "Verizon",
          "percent": 40
        },
        {
          "name": "Cricket Communications",
          "percent": 20
        }
      ],
      "users": [
        {
          "name": "23 Feb",
          "percent": 50
        },
        {
          "name": "2 Feb",
          "percent": 25
        },
        {
          "name": "3 Feb",
          "percent": 25
        }
      ]
    },
    "period": "2 Feb - 3 Mar"
  },
  "7days": {
    "dashboard": {
      "total_sessions": {
        "total": 0,
        "change": "∞",
        "trend": "d"
      },
      "total_users": {
        "total": 0,
        "change": "∞",
        "trend": "d",
        "is_estimate": true
      },
      "new_users": {
        "total": 0,
        "change": "∞",
        "trend": "d"
      },
      "total_time": {
        "total": "0.0 min",
        "change": "∞",
        "trend": "d"
      },
      "avg_time": {
        "total": "0.0 min",
        "change": "∞",
        "trend": "d"
      },
      "avg_requests": {
        "total": "0.0",
        "change": "∞",
        "trend": "d"
      }
    },
    "top": {
      "platforms": [],
      "resolutions": [],
      "carriers": [],
      "users": []
    },
    "period": "25 Feb - 3 Mar"
  },
  "today": {
    "dashboard": {
      "total_sessions": {
        "total": 0,
        "change": "NA",
        "trend": "u"
      },
      "total_users": {
        "total": 0,
        "change": "NA",
        "trend": "u",
        "is_estimate": false
      },
      "new_users": {
        "total": 0,
        "change": "NA",
        "trend": "u"
      },
      "total_time": {
        "total": "0.0 min",
        "change": "NA",
        "trend": "u"
      },
      "avg_time": {
        "total": "0.0 min",
        "change": "NA",
        "trend": "u"
      },
      "avg_requests": {
        "total": "0.0",
        "change": "NA",
        "trend": "u"
      }
    },
    "top": {
      "platforms": [],
      "resolutions": [],
      "carriers": [],
      "users": []
    },
    "period": "00:00 - 10:24"
  }
}

Path Params

api_key
string
required

API_KEY of user, with permission to access this app

app_id
string
required

ID of the app for which to query

Query Params

callback
string

(optional) name of callback function for JSONP output

 

Retrieves the pre processed data to display at countly dashboard.
It displays data in 3 ranges:
recent 30 days
recent 7 days
and today

Each time period provides dashboard data, some top metrics and period name

Dashboard data can contain total sessions, total users, new users, total time, average time and average request.
Each data contains:
total amount or sum of instances for this period,
change in percentage or NA if not available
trend, which can be u for up and d for down

Top contains some top metrics as platforms, resolutions, carriers and users with percentage amount

Suggest Edits

/o/analytics/countries

Retrieve analytics data about countries

 
gethttps://try.count.ly/o/analytics/countries?api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o/analytics/countries?app_id=app_id&api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o/analytics/countries',
  qs: 
   { app_id: 'app_id',
     api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o/analytics/countries?app_id=app_id&api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o/analytics/countries?app_id=app_id&api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/o/analytics/countries"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "30days": [
    {
      "country": "Japan",
      "code": "jp",
      "t": 3,
      "u": 3,
      "n": 3
    },
    {
      "country": "United States",
      "code": "us",
      "t": 3,
      "u": 6,
      "n": 3
    },
    {
      "country": "United Kingdom",
      "code": "gb",
      "t": 2,
      "u": 4,
      "n": 2
    },
    {
      "country": "Unknown",
      "code": "unknown",
      "t": 1,
      "u": 1,
      "n": 1
    },
    {
      "country": "Germany",
      "code": "de",
      "t": 1,
      "u": 2,
      "n": 1
    }
  ],
  "7days": [],
  "today": []
}

Path Params

api_key
string
required

API_KEY of user, with permission to access this app

app_id
string
required

ID of the app for which to query

Query Params

callback
string

(optional) name of callback function for JSONP output

 

Retrieves the pre processed data about countries.
And similar to dashboard data, country data is divided in same time periods: 30 days, 7 days and today
It provides country name and code and:
t - total amount of sessions
u - unique amount of sessions
n - new amount of sessions

Suggest Edits

/o/analytics/sessions

Retrieve session data for specified period

 
gethttps://try.count.ly/o/analytics/sessions?api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o/analytics/sessions?app_id=app_id&api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o/analytics/sessions',
  qs: 
   { app_id: 'app_id',
     api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o/analytics/sessions?app_id=app_id&api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o/analytics/sessions?app_id=app_id&api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/o/analytics/sessions"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
  {
    "_id": "2015-2-2",
    "t": 1,
    "n": 1,
    "u": 1,
    "d": 60,
    "e": 7
  },
  {
    "_id": "2015-2-3",
    "t": 1,
    "n": 1,
    "u": 1,
    "d": 30,
    "e": 3
  },
  {
    "_id": "2015-2-4",
    "t": 1,
    "n": 1,
    "u": 1,
    "d": 30,
    "e": 3
  },
  {
    "_id": "2015-2-5",
    "t": 1,
    "n": 1,
    "u": 1,
    "d": 30,
    "e": 3
  },
  {
    "_id": "2015-2-6",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-2-7",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-2-8",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-2-9",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-2-10",
    "t": 1,
    "n": 1,
    "u": 1,
    "d": 30,
    "e": 3
  },
  {
    "_id": "2015-2-11",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-2-12",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-2-13",
    "t": 1,
    "n": 1,
    "u": 1,
    "d": 30,
    "e": 5
  },
  {
    "_id": "2015-2-14",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-2-15",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-2-16",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-2-17",
    "t": 1,
    "n": 1,
    "u": 1,
    "d": 30,
    "e": 6
  },
  {
    "_id": "2015-2-18",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-2-19",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-2-20",
    "t": 1,
    "n": 1,
    "u": 1,
    "d": 60,
    "e": 10
  },
  {
    "_id": "2015-2-21",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-2-22",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-2-23",
    "t": 2,
    "n": 2,
    "u": 2,
    "d": 90,
    "e": 13
  },
  {
    "_id": "2015-2-24",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-2-25",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-2-26",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-2-27",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-2-28",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-3-1",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-3-2",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  },
  {
    "_id": "2015-3-3",
    "t": 0,
    "n": 0,
    "u": 0,
    "d": 0,
    "e": 0
  }
]

Path Params

api_key
string
required

API_KEY of user, with permission to access this app

app_id
string
required

ID of the app for which to query

Query Params

period
string

For which time period to provide data, possible values (month, 60days, 30days, 7days, yesterday, hour or [startMiliseconds, endMiliseconds] as [1417730400000,1420149600000])

callback
string

(optional) name of callback function for JSONP output

 

Returns session related data as an array.
Each array item has following properties;

_id: Date in one of the following formats YYYY-M, YYYY-M-D, YYYY-M-D H:00

u: Total (unique) users

t: Total sessions

n: New users

d: Total session duration (in seconds)

e: Total write API requests received

Suggest Edits

/o/analytics/metric

Retrieve metric data for specified period

 
gethttps://try.count.ly/o/analytics/metric?api_key=api_key&app_id=app_id&metric=metric
curl --request GET \
  --url 'https://try.count.ly/o/analytics/metric?metric=metric&app_id=app_id&api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o/analytics/metric',
  qs: { metric: 'metric', app_id: 'app_id', api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o/analytics/metric?metric=metric&app_id=app_id&api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o/analytics/metric?metric=metric&app_id=app_id&api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/o/analytics/metric"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
  {
    "_id": "Rogers Wireless",
    "t": 2,
    "n": 2,
    "u": 2
  },
  {
    "_id": "Verizon",
    "t": 2,
    "n": 2,
    "u": 4
  },
  {
    "_id": "Cricket Communications",
    "t": 1,
    "n": 1,
    "u": 1
  },
  {
    "_id": "Sprint",
    "t": 1,
    "n": 1,
    "u": 2
  },
  {
    "_id": "\tAt&t",
    "t": 1,
    "n": 1,
    "u": 2
  },
  {
    "_id": "Vodafone",
    "t": 1,
    "n": 1,
    "u": 2
  },
  {
    "_id": "Bell Canada",
    "t": 1,
    "n": 1,
    "u": 2
  },
  {
    "_id": "Tele2",
    "t": 1,
    "n": 1,
    "u": 2
  }
]

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

metric
string

Metric name available from o?method apis

period
string

For which time period to provide data, possible values (month, 60days, 30days, 7days, yesterday, hour or [startMiliseconds, endMiliseconds] as [1417730400000,1420149600000])

callback
string

(optional) name of callback function for JSONP output

 

Returns metric related data as an array. Each array item has following properties:

_id: Group/segment. For example if you are fetching data for devices this will be the device name.

u: Total (unique) users

t: Total sessions

n: New users

Available metrics to query:

  • app_versions
  • carriers
  • countries
  • density
  • devices
  • langs
  • os
  • os_versions
  • resolutions
Suggest Edits

/o/analytics/tops

Retrieve up to top 3 values for specified period

 
gethttps://try.count.ly/o/analytics/tops?api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o/analytics/tops?app_id=app_id&api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o/analytics/tops',
  qs: { app_id: 'app_id', api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o/analytics/tops?app_id=app_id&api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o/analytics/tops?app_id=app_id&api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/o/analytics/tops"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "platforms": [
    {
      "name": "Android",
      "percent": 60
    },
    {
      "name": "iOS",
      "percent": 30
    },
    {
      "name": "Windows Phone",
      "percent": 10
    }
  ],
  "resolutions": [
    {
      "name": "360x640",
      "percent": 60
    },
    {
      "name": "480x800",
      "percent": 20
    },
    {
      "name": "640x1136",
      "percent": 20
    }
  ],
  "carriers": [
    {
      "name": "Rogers Wireless",
      "percent": 40
    },
    {
      "name": "Verizon",
      "percent": 40
    },
    {
      "name": "Cricket Communications",
      "percent": 20
    }
  ],
  "countries": [
    {
      "name": "JP",
      "percent": 37
    },
    {
      "name": "US",
      "percent": 37
    },
    {
      "name": "GB",
      "percent": 26
    }
  ]
}

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

period
string

For which time period to provide data, possible values (month, 60days, 30days, 7days, yesterday, hour or [startMiliseconds, endMiliseconds] as [1417730400000,1420149600000])

callback
string

(optional) name of callback function for JSONP output

 

Retrieves up to 3 top values with percentages for platforms, resolutions, carries and countries

Suggest Edits

/o/analytics/loyalty

Retrieves loyalty data for specified period

 
gethttps://try.count.ly/o/analytics/loyalty?api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o/analytics/loyalty?app_id=app_id&api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o/analytics/loyalty',
  qs: { app_id: 'app_id', api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o/analytics/loyalty?app_id=app_id&api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o/analytics/loyalty?app_id=app_id&api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/o/analytics/loyalty"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
  {
    "l": "0",
    "t": 1148,
    "percent": "95.2"
  },
  {
    "l": "1",
    "t": 26,
    "percent": "2.2"
  },
  {
    "l": "2",
    "t": 16,
    "percent": "1.3"
  },
  {
    "l": "3",
    "t": 7,
    "percent": "0.6"
  },
  {
    "l": "4",
    "t": 6,
    "percent": "0.5"
  },
  {
    "l": "5",
    "t": 2,
    "percent": "0.2"
  },
  {
    "l": "6",
    "t": 1,
    "percent": "0.1"
  }
]

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

period
string

For which time period to provide data, possible values (month, 60days, 30days, 7days, yesterday, hour or [startMiliseconds, endMiliseconds] as [1417730400000,1420149600000])

callback
string

(optional) name of callback function for JSONP output

 

Retrieves loyalty data, where

  • l - loyalty bucket id
  • t - amount of users in bucket for that period
  • percent - percentage of users in bucket for that period

Loyalty buckets are:

  • "1"
  • "2"
  • "3-5"
  • "6-9"
  • "10-19"
  • "20-49"
  • "50-99"
  • "100-499"
  • "> 500"
Suggest Edits

/o/analytics/frequency

Retrieves frequency data for specified period

 
gethttps://try.count.ly/o/analytics/frequency?api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o/analytics/frequency?app_id=app_id&api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o/analytics/frequency',
  qs: { app_id: 'app_id', api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o/analytics/frequency?app_id=app_id&api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o/analytics/frequency?app_id=app_id&api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/o/analytics/frequency"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
  {
    "f": "0",
    "t": 1148,
    "percent": "95.2"
  },
  {
    "f": "11",
    "t": 20,
    "percent": "1.7"
  },
  {
    "f": "10",
    "t": 13,
    "percent": "1.1"
  },
  {
    "f": "2",
    "t": 8,
    "percent": "0.7"
  },
  {
    "f": "8",
    "t": 3,
    "percent": "0.2"
  },
  {
    "f": "6",
    "t": 3,
    "percent": "0.2"
  },
  {
    "f": "5",
    "t": 3,
    "percent": "0.2"
  },
  {
    "f": "4",
    "t": 3,
    "percent": "0.2"
  },
  {
    "f": "3",
    "t": 2,
    "percent": "0.2"
  },
  {
    "f": "7",
    "t": 2,
    "percent": "0.2"
  },
  {
    "f": "1",
    "t": 1,
    "percent": "0.1"
  }
]

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

period
string

For which time period to provide data, possible values (month, 60days, 30days, 7days, yesterday, hour or [startMiliseconds, endMiliseconds] as [1417730400000,1420149600000])

callback
string

(optional) name of callback function for JSONP output

 

Retrieves frequency data, where

  • f - frequency bucket id
  • t - amount of users in bucket for that period
  • percent - percentage of users in bucket for that period

Frequency buckets are:

  • "1-24 hours"
  • "1 day"
  • "2 days"
  • "3 days"
  • "4 days"
  • "5 days"
  • "6 days"
  • "7 days"
  • "8-14 days"
  • "15-30 days"
  • "30+ days"
Suggest Edits

/o/analytics/durations

Retrieves durations data for specified period

 
gethttps://try.count.ly/o/analytics/durations?api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o/analytics/durations?app_id=app_id&api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o/analytics/durations',
  qs: { app_id: 'app_id', api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o/analytics/durations?app_id=app_id&api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o/analytics/durations?app_id=app_id&api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/o/analytics/durations"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
  {
    "ds": "0",
    "t": 602,
    "percent": "39.2"
  },
  {
    "ds": "3",
    "t": 226,
    "percent": "14.7"
  },
  {
    "ds": "1",
    "t": 205,
    "percent": "13.3"
  },
  {
    "ds": "4",
    "t": 174,
    "percent": "11.3"
  },
  {
    "ds": "2",
    "t": 126,
    "percent": "8.2"
  },
  {
    "ds": "5",
    "t": 92,
    "percent": "6.0"
  },
  {
    "ds": "7",
    "t": 85,
    "percent": "5.5"
  },
  {
    "ds": "6",
    "t": 26,
    "percent": "1.7"
  }
]

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

period
string

For which time period to provide data, possible values (month, 60days, 30days, 7days, yesterday, hour or [startMiliseconds, endMiliseconds] as [1417730400000,1420149600000])

callback
string

(optional) name of callback function for JSONP output

 

Retrieves durations data, where

  • ds - durations bucket id
  • t - amount of users in bucket for that period
  • percent - percentage of users in bucket for that period

Durations buckets are:

  • "0-10 seconds"
  • "11-30 seconds"
  • "31-60 seconds"
  • "1-3 minutes"
  • "3-10 minutes"
  • "10-30 minutes"
  • "30-60 minutes"
  • "> 1 hours"
Suggest Edits

/o/ping

Server health check

 
gethttps://try.count.ly/o/ping
curl --request GET \
  --url https://try.count.ly/o/ping
var request = require("request");

var options = { method: 'GET', url: 'https://try.count.ly/o/ping' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o/ping")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o/ping");

xhr.send(data);
import requests

url = "https://try.count.ly/o/ping"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{"result":"Success"}
{"result":"DB Error"}
 

This api allows to check if Countly server is running and has connection to the database

Suggest Edits

/i/users/create

Create new user

 
gethttps://try.count.ly/i/users/create?api_key=api_key&args=args
curl --request GET \
  --url 'https://try.count.ly/i/users/create?args=args&api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/i/users/create',
  qs: { args: 'args', api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/i/users/create?args=args&api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/i/users/create?args=args&api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/i/users/create"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "full_name":"Test User",
  "username":"test",
  "email":"test@domain.com",
  "created_at":1412158042,
  "_id":"542bd25ab3bced1a67000005",
  "api_key":"f9d9ad2d9ebf5c0b9144e1740ca8f769"
}

Query Params

api_key
string

Admin API_KEY

args
string

JSON object as string with user data.

callback
string

(optional) name of callback function for JSONP output

 

Creates new users from values provided in args parameter as stringified JSON

The value that can be included in args are:

'full_name': { 'required': true, 'type': 'String' },// name of the user

'username': { 'required': true, 'type': 'String' },// username of the user

'password': { 'required': true, 'type': 'String' }, //user's password

'email': { 'required': true, 'type': 'String' },// user's email

'admin_of': { 'required': false, 'type': 'Array' },// list of apps which user will be admin of

'user_of': { 'required': false, 'type': 'Array' }, //list of apps which user will be user of

'global_admin': { 'required': false, 'type': 'Boolean' }// is user a global admin

Suggest Edits

/i/users/update

Update user

 
gethttps://try.count.ly/i/users/update?api_key=api_key&args=args
curl --request GET \
  --url 'https://try.count.ly/i/users/update?args=args&api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/i/users/update',
  qs: { args: 'args', api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/i/users/update?args=args&api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/i/users/update?args=args&api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/i/users/update"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{"result":"Success"}

Query Params

api_key
string

Admin API_KEY

args
string

JSON object as string with user data.

callback
string

(optional) name of callback function for JSONP output

 

Update user's information from values provided in args parameter as stringified JSON

The value that can be included in args are:

'user_id': { 'required': true, 'type': 'String' }, //ID of user to update

'full_name': { 'required': false, 'type': 'String' }, //new full name

'username': { 'required': false, 'type': 'String' }, //new username

'password': { 'required': false, 'type': 'String' }, //new password

'email': { 'required': false, 'type': 'String' }, //new email

'admin_of': { 'required': false, 'type': 'Array' }, //list of apps to make admin of

'user_of': { 'required': false, 'type': 'Array' }, //list of apps is user of

'global_admin': { 'required': false, 'type': 'Boolean' }, //should be global admin

'send_notification': { 'required': false, 'type': 'Boolean' } //send email notification about changes

Suggest Edits

/i/users/delete

Delete users

 
gethttps://try.count.ly/i/users/delete?api_key=api_key&args=args
curl --request GET \
  --url 'https://try.count.ly/i/users/delete?args=args&api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/i/users/delete',
  qs: { args: 'args', api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/i/users/delete?args=args&api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/i/users/delete?args=args&api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/i/users/delete"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{"result":"Success"}

Query Params

api_key
string

Admin API_KEY

args
string

JSON object as string with list of user ids to delete.

callback
string

(optional) name of callback function for JSONP output

 

Delete users with provided user ids from args parameter's user_ids list property. args parameter should be passed as stringified JSON

Example args content:
{user_ids:["542bd25ab3bced1a67000005", "542bd25ab3bced1a67000006", "542bd25ab3bced1a67000007"]}

Suggest Edits

/i/apps/create

Create new app

 
gethttps://try.count.ly/i/apps/create?api_key=api_key&args=args
curl --request GET \
  --url 'https://try.count.ly/i/apps/create?args=args&api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/i/apps/create',
  qs: { args: 'args', api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/i/apps/create?args=args&api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/i/apps/create?args=args&api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/i/apps/create"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "name":"Test App",
  "country":"TR",
  "timezone":"Europe/Istanbul",
  "category":"6",
  "_id":"542bd7c2b3bced1a67000006",
  "key":"4170b44d6459bba992acaa857ac5b25d7fac6cc1"
}

Query Params

api_key
string

Admin API_KEY

args
string

JSON object as string with app data.

callback
string

(optional) name of callback function for JSONP output

 

Creates new app from values provided in args parameter as stringified JSON

args can contain this properties:

'name': { 'required': true, 'type': 'String' }, //name of the app

'country': { 'required': false, 'type': 'String' }, //your country

'type': { 'required': false, 'type': 'String' }, // type of the app, mobile, web, et

'category': { 'required': false, 'type': 'String' },// ID of app category

'timezone': { 'required': false, 'type': 'String' }// timezone in which to display statistics

Example request could look like

/i/apps/create?api_key=your-api-key&args={"name":"Test App","type":"mobile"}

Suggest Edits

/i/apps/update

Update app information

 
gethttps://try.count.ly/i/apps/update?api_key=api_key&args=args
curl --request GET \
  --url 'https://try.count.ly/i/apps/update?args=args&api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/i/apps/update',
  qs: { args: 'args', api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/i/apps/update?args=args&api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/i/apps/update?args=args&api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/i/apps/update"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "name":"Test",
  "country":"TR",
  "timezone":"Europe/Istanbul",
  "category":"6"
}

Query Params

api_key
string

Admin API_KEY

args
string

JSON object as string with user data.

callback
string

(optional) name of callback function for JSONP output

 

Update app information from values provided in args parameter as stringified JSON

args can contain this properties:

'app_id': { 'required': true, 'type': 'String'}, //ID of the app to change information

'name': { 'required': false, 'type': 'String' },// new app name

'category': { 'required': false, 'type': 'String' },// new app category ID

'timezone': { 'required': false, 'type': 'String' },//new timezone

'country': { 'required': false, 'type': 'String' } //new app country

Suggest Edits

/i/apps/reset

Reset all app data and events

 
gethttps://try.count.ly/i/apps/reset?api_key=api_key&args=args
http://try.count.ly/i/apps/reset?args={"app_id":"582b5315efe8d0485fe121de","period":"all"}&api_key=1232
A binary file was returned

You couldn't be authenticated

{"result":"Success"}

Query Params

api_key
string

Admin API_KEY

args
string

JSON object as string with data as app_id and period for which to delete data

callback
string

(optional) name of callback function for JSONP output

 

Reset all app data (sessions, events, metrics, etc) with provided app id from args parameter's app_id property. Parameter period controls which data will be deleter.
args parameter should be passed as stringified JSON

Example args content: {"app_id":"542bad58b3bced1a67000003", "period":"all"}

If period parameter is all, then data for all periods will be deleted.
If period parameter is reset, then not only all data will be deleted, but also all app configuration will be reset. Like deletes all created campaigns, bookmarked drill queries, etc.

Other period parameter values indicate the period for which app data should be preserved and older data deleted:

  • 1month - delete data older than 1 month
  • 3month - delete data older than 3 month
  • 6month - delete data older thanb6 month
  • 1year - delete data older than 1 year
  • 2year -delete data older than 2 years
Suggest Edits

/i/apps/delete

Delete app

 
gethttps://try.count.ly/i/apps/delete?api_key=api_key&args=args
curl --request GET \
  --url 'https://try.count.ly/i/apps/delete?args=args&api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/i/apps/delete',
  qs: { args: 'args', api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/i/apps/delete?args=args&api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/i/apps/delete?args=args&api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/i/apps/delete"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{"result":"Success"}

Query Params

api_key
string

Admin API_KEY

args
string

JSON object as string with user data.

 

Delete app with provided app id from args parameter's app_id property. args parameter should be passed as stringified JSON

Example args content: {app_id:"542bad58b3bced1a67000003"}

Suggest Edits

/i/bulk

Bulk session, metric, event data writing

 
posthttps://try.count.ly/i/bulk?app_key=app_key
curl --request POST \
  --url 'https://try.count.ly/i/bulk?app_key=app_key'
var request = require("request");

var options = { method: 'POST',
  url: 'https://try.count.ly/i/bulk',
  qs: { app_key: 'app_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/i/bulk?app_key=app_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://try.count.ly/i/bulk?app_key=app_key");

xhr.send(data);
import requests

url = "https://try.count.ly/i/bulk"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{"result":"Success"}

Query Params

app_key
string

(optional) global app_key, you can also provide separate app_key for each request in it's object

Form Data

requests
string

JSON Array as string with request objects that you would usually pass to /i api path

 

Bulk method limitations

Countly v16.02 had issues with parallelization. Basically there is no guarantee that bulk requests will be executed in the order you provided them, they also can be executed simultaneously.

If order of execution does not matter (as events, crashes, user info), you can use bulk API. But if order of execution matters, like in sessions, then results may be inconsistent with what you would receive if you execute all requests separately.

This has been since fixed in Countly v16.06

Basically instead of sending separate requests to /i with session data, metrics and events, you can combine them in one single HTTP request (for example when sending older data with timestamp, while user did not have Internet connection)

For that you would need to convert normal /i request parameters into JSON object, so for example, sending bulk data which combine 4 normal requests:

1) to start session with metrics

2) to update session duration

3) to send an event

4) to end session

[
  {
    "device_id":"1234567890", 
    "app_key":"9a4d196c01d3ca82876c0398ab774e5e", 
    "begin_session":1, 
    "metrics":
    {
      "_os": "IOS",
      "_os_version": "7.1",
      "_resolution": "2048x1536", 
      "_density": "200dpi", 
      "_device": "iPod",
      "_carrier": "Telecom",
      "_app_version": "1.2"
    }
  },
  {
    "device_id":"1234567890", 
    "app_key":"9a4d196c01d3ca82876c0398ab774e5e", 
    "session_duration":30
  },
  {
    "device_id":"1234567890", 
    "app_key":"9a4d196c01d3ca82876c0398ab774e5e", 
    "events":
    [
      {
        "key": "test2", 
        "count": 2, 
        "sum":1.50, 
        "segmentation": 
        {
          "country": "Latvia",
          "market": "googleplay"
        }
      }
    ]
  },
  {
    "device_id":"1234567890", 
    "app_key":"9a4d196c01d3ca82876c0398ab774e5e", 
    "end_session":1
  }
];

Also, it's possible to combine the 'start_session', 'metrics', 'session_duration', 'events' and 'end_session' together into one JSON block, with the appropriate device_id and api_key. You only need to make sure that the order is correct.

Here's an example:

var params = [
{"device_id":DEVICE_ID, "app_key":APP_KEY, "begin_session":1, "metrics":{"os": "Android"}},
{"device_id":DEVICE_ID, "app_key":APP_KEY, "session_duration":30},
{"device_id":DEVICEID+"A", "app_key":APP_KEY, "end_session":1}
];
Suggest Edits

/i/app_users/create

Create new app user

 
gethttps://try.count.ly/i/app_users/create?api_key=api_key
curl --request GET \
  --url 'https://try.count.ly/i/app_users/create?api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/i/app_users/create',
  qs: { api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/i/app_users/create?api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/i/app_users/create?api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/i/app_users/create"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "result":"User Created: {\"did\":\"123456789\"}"
}
{"result":"Parameter \"data\" cannot be empty"}

Query Params

api_key
string

Admin API_KEY

callback
string

(optional) name of callback function for JSONP output

app_id
string

ID of the app for which to query

data
string

JSON encoded string of object with user properties which to insert into app_users collection. Only mandatory property is did which represents device_id

 

Creates new user with provided properties.
The only mandatory property is did which is device_id

Suggest Edits

/i/app_users/update

Update existing app user

 
gethttps://try.count.ly/i/app_users/update?api_key=api_key
curl --request GET \
  --url 'https://try.count.ly/i/app_users/update?api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/i/app_users/update',
  qs: { api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/i/app_users/update?api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/i/app_users/update?api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/i/app_users/update"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "result":"User Updated"
}
{"result":"Parameter \"update\" cannot be empty"}

Query Params

api_key
string

Admin API_KEY

callback
string

(optional) name of callback function for JSONP output

app_id
string

ID of the app for which to query

update
string

JSON encoded mongodb update object

query
string

JSON encoded string MongoDB query object which users to update

 

Updates existing app users based on provided query parameter to select which users to update and using update object to modify document

Suggest Edits

/i/app_users/delete

Delete existing app user

 
gethttps://try.count.ly/i/app_users/delete?api_key=api_key
curl --request GET \
  --url 'https://try.count.ly/i/app_users/delete?api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/i/app_users/delete',
  qs: { api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/i/app_users/delete?api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/i/app_users/delete?api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/i/app_users/delete"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "result":"User deleted"
}
{"result":"This query would delete more than one user"}

Query Params

api_key
string

Admin API_KEY

callback
string

(optional) name of callback function for JSONP output

app_id
string

ID of the app for which to query

query
string

JSON encoded string MongoDB query object which users to delete

 

Delete existing app user and everything Countly knows about this user

Suggest Edits

/i/app_users/export

Export information about app user

 
gethttps://try.count.ly/i/app_users/export?api_key=api_key
curl --request GET \
  --url 'https://try.count.ly/i/app_users/export?api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/i/app_users/export',
  qs: { api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/i/app_users/export?api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/i/app_users/export?api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/i/app_users/export"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "result":"1234567890.tar.gz"
}
{"result":"Error"}

Query Params

api_key
string

Admin API_KEY

callback
string

(optional) name of callback function for JSONP output

app_id
string

ID of the app for which to query

query
string

JSON encoded string MongoDB query object which users to export

 

Starts the export process, which generate export file on server, that can be downloaded later

Suggest Edits

/i/app_users/deleteExport/:filename

Delete previously exported file

 
gethttps://try.count.ly/i/app_users/deleteExport/filename?api_key=api_key
curl --request GET \
  --url 'https://try.count.ly/i/app_users/deleteExport/filename?api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/i/app_users/deleteExport/filename',
  qs: { api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/i/app_users/deleteExport/filename?api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/i/app_users/deleteExport/filename?api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/i/app_users/deleteExport/filename"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "result":"Export deleted"
}
{"result":"Error"}

Path Params

filename
string
required

name of the file to delete

Query Params

api_key
string

Admin API_KEY

callback
string

(optional) name of callback function for JSONP output

app_id
string

ID of the app for which to query

 

Deletes export file by provided name, that was previously generated

Suggest Edits

/o/app_users/download/:filename

Download previously exported file

 
gethttps://try.count.ly/o/app_users/download/filename?api_key=api_key
curl --request GET \
  --url 'https://try.count.ly/o/app_users/download/filename?api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o/app_users/download/filename',
  qs: { api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o/app_users/download/filename?api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o/app_users/download/filename?api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/o/app_users/download/filename"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

filename
string
required

name of the file to download

Query Params

api_key
string

Admin API_KEY

callback
string

(optional) name of callback function for JSONP output

app_id
string

ID of the app for which to query

 

Downloads exported file by provided name, that was previously generated

Suggest Edits

/o?method=segmentation

Breakdown of data for specific event by provided bucket

 
gethttps://try.count.ly/o?method=segmentation&api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o?app_id=app_id&api_key=api_key&method=segmentation'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o',
  qs: { app_id: 'app_id', api_key: 'api_key', method: 'segmentation' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o?app_id=app_id&api_key=api_key&method=segmentation")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o?app_id=app_id&api_key=api_key&method=segmentation");

xhr.send(data);
import requests

url = "https://try.count.ly/o"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{  
   "data":{  
      "2016.5.29":{  
         "u":17,
         "t":17,
         "s":0,
         "dur":74
      },
      "2016.6.1":{  
         "u":12,
         "t":12,
         "s":0,
         "dur":63
      },
      "2016.5.27":{  
         "u":6,
         "t":6,
         "s":0,
         "dur":37
      },
      "2016.5.26":{  
         "u":10,
         "t":10,
         "s":0,
         "dur":49
      },
      "2016.5.28":{  
         "u":18,
         "t":18,
         "s":0,
         "dur":90
      },
      "2016.5.30":{  
         "u":16,
         "t":16,
         "s":0,
         "dur":76
      },
      "2016.5.31":{  
         "u":11,
         "t":11,
         "s":0,
         "dur":33
      }
   },
   "meta":[  

   ],
   "lu":"2016-06-13T12:37:10.405Z"
}
{  
   "data":{  
      "2016.4.26":{  
         "notification":{  
            "u":1,
            "t":1,
            "s":0,
            "dur":5
         },
         "twitter":{  
            "u":7,
            "t":7,
            "s":0,
            "dur":41
         },
         "unknown":{  
            "u":4,
            "t":4,
            "s":0,
            "dur":5
         }
      },
      "2016.4.29":{  
         "notification":{  
            "u":6,
            "t":6,
            "s":0,
            "dur":30
         },
         "twitter":{  
            "u":7,
            "t":7,
            "s":0,
            "dur":44
         },
         "unknown":{  
            "u":10,
            "t":10,
            "s":0,
            "dur":51
         }
      },
      "2016.5.1":{  
         "notification":{  
            "u":4,
            "t":4,
            "s":0,
            "dur":18
         },
         "unknown":{  
            "u":10,
            "t":10,
            "s":0,
            "dur":59
         },
         "twitter":{  
            "u":1,
            "t":1,
            "s":0,
            "dur":8
         }
      },
      "2016.4.24":{  
         "notification":{  
            "u":1,
            "t":1,
            "s":0,
            "dur":8
         },
         "twitter":{  
            "u":6,
            "t":6,
            "s":0,
            "dur":30
         },
         "unknown":{  
            "u":3,
            "t":3,
            "s":0,
            "dur":19
         }
      },
   },
   "meta":[  
      "twitter",
      "unknown",
      "notification"
   ],
   "notification":{  
      "t":325,
      "u":323,
      "s":0,
      "dur":1704
   },
   "twitter":{  
      "t":360,
      "u":350,
      "s":0,
      "dur":1853
   },
   "unknown":{  
      "t":334,
      "u":330,
      "s":0,
      "dur":1574
   },
   "lu":"2016-06-13T12:44:41.397Z"
}

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

event
string

Which event to query

period
string

For which time period to provide data, possible values (month, 60days, 30days, 7days, yesterday, hour or [startMiliseconds, endMiliseconds] as [1417730400000,1420149600000])

bucket
string

period by which to breakdown data: hourly, daily, weekly, monthly

projectionKey
string

Show top results by specific segment value

queryObject
string

Json string encoded mongodb query

callback
string

(optional) name of callback function for JSONP output

 

This api allows to query events that were recorded in drill. Event can be any custom event sent to Countly server, as well as internal events like:

  • [CLY]_session for sessions
  • [CLY]_crash for crahses
  • [CLY]_view for views
  • [CLY]_action for actions
  • [CLY]_push_action for actions performed on push notifications
  • [CLY]_push_open for opened push notifications
  • [CLY]_push_sent for sent push notifications

It provides following properties for each bucket:

  • u - unique users
  • t - total times/count
  • s - sum property if provided for event
  • dur - duration property if provided for event

meta property lists breakdown by segments for queries with projection key

Suggest Edits

/o?method=segmentation_users

Get list of user uid properties for provided segmentation query

 
gethttps://try.count.ly/o?method=segmentation_users&api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o?app_id=app_id&api_key=api_key&method=segmentation_users'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o',
  qs: 
   { app_id: 'app_id',
     api_key: 'api_key',
     method: 'segmentation_users' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o?app_id=app_id&api_key=api_key&method=segmentation_users")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o?app_id=app_id&api_key=api_key&method=segmentation_users");

xhr.send(data);
import requests

url = "https://try.count.ly/o"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

["f7","sW","iI","qJ","tV","tO","tP","j5","fo","ad","jl","cU","sn","sZ","bo","pN","jz","c1","as","dc","hI","eL","oD","iS","nQ","kD","lR","iR","nq","uF"]

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

event
string

Which event to query

period
string

For which time period to provide data, possible values (month, 60days, 30days, 7days, yesterday, hour or [startMiliseconds, endMiliseconds] as [1417730400000,1420149600000])

bucket
string

period by which to breakdown data: hourly, daily, weekly, monthly

queryObject
string

Json string encoded mongodb query

callback
string

(optional) name of callback function for JSONP output

 

This api allows to query user lists for segmented events that were recorded in drill. Event can be any custom event sent to Countly server, as well as internal events like:

  • [CLY]_session for sessions
  • [CLY]_crash for crahses
  • [CLY]_view for views
  • [CLY]_action for actions
  • [CLY]_push_action for actions performed on push notifications
  • [CLY]_push_open for opened push notifications
  • [CLY]_push_sent for sent push notifications

It provides JSON array with uid properties, which are Countly internal user ids.

Suggest Edits

/o?method=segmentation_meta

Fetches all segment data for provided event

 
gethttps://try.count.ly/o?method=segmentation_meta&api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o?app_id=app_id&api_key=api_key&method=segmentation_meta'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o',
  qs: 
   { app_id: 'app_id',
     api_key: 'api_key',
     method: 'segmentation_meta' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o?app_id=app_id&api_key=api_key&method=segmentation_meta")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o?app_id=app_id&api_key=api_key&method=segmentation_meta");

xhr.send(data);
import requests

url = "https://try.count.ly/o"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{  
   "e":"[CLY]_session",
   "app_id":"56e53239a941253d470d7c52",
   "up":{  
      "cty":{  
         "values":[  
            "Riga",
            "Unknown",
            "Ashburn",
            "Newark",
            "Tokyo"
         ],
         "type":"l"
      },
      "cc":{  
         "values":[  
            "LV",
            "Unknown",
            "JP",
            "CN",
            "US"
         ],
         "type":"l"
      },
      "fs":{  
         "type":"d"
      },
      "ls":{  
         "type":"d"
      },
      "sc":{  
         "type":"n"
      },
      "lat":{  
         "type":"n"
      },
      "lng":{  
         "type":"n"
      },
      "av":{  
         "values":[  
            "1:4",
            "3:1",
            "1:7",
            "1:3"
         ],
         "type":"l"
      },
      "d":{  
         "values":[  
            "iPod7,1",
            "iPad3,6",
            "MB860",
            "Lumia 540",
            "iPhone8,1"
         ],
         "type":"l"
      },
      "p":{  
         "values":[  
            "iOS",
            "Android",
            "Windows Phone"
         ],
         "type":"l"
      },
      "pv":{  
         "values":[  
            "i8:4:1",
            "i10:1:1",
            "a4:3:1",
            "w8",
            "i7:1:2"
         ],
         "type":"l"
      },
      "c":{  
         "values":[  
            "Verizon",
            "Telus",
            "Tele2",
            "Orange",
            "Vodafone"
         ],
         "type":"l"
      },
      "r":{  
         "values":[  
            "640x1136",
            "600x800",
            "480x800",
            "768x1366",
            "240x400"
         ],
         "type":"l"
      },
      "dnst":{  
         "values":[  
            "i@3",
            "i@2",
            "aXXHDPI",
            "w2:5"
         ],
         "type":"l"
      },
      "la":{  
         "values":[  
            "fr",
            "de",
            "ja",
            "it",
            "en",
            "ko"
         ],
         "type":"l"
      },
      "gender":{  
         "values":[  
            "M",
            "F"
         ],
         "type":"l"
      },
      "src":{  
         "type":"bl"
      },
      "name":{  
         "type":"s"
      },
      "username":{  
         "type":"s"
      },
      "email":{  
         "type":"s"
      },
      "organization":{  
         "type":"s"
      },
      "phone":{  
         "type":"s"
      },
      "byear":{  
         "type":"n"
      },
      "cdfs":{  
         "type":"n"
      },
      "lv":{  
         "type":"bl"
      },
      "tsd":{  
         "type":"n"
      },
      "cwfs":{  
         "type":"n"
      },
      "lp":{  
         "type":"d"
      },
      "lpa":{  
         "type":"n"
      },
      "tp":{  
         "type":"n"
      },
      "tpc":{  
         "type":"n"
      }
   },
   "custom":{  
      "Twitter Login":{  
         "values":[  
            "true"
         ],
         "type":"l"
      },
      "Twitter Login name":{  
         "values":[  
            "@rimanije",
            "@ne",
            "@ker",
            "@vip",
            "@ite",
            "@voseero",
            "@ocboite"
         ],
         "type":"l"
      },
      "Has Apple Watch OS":{  
         "values":[  
            "true"
         ],
         "type":"l"
      },
      "Facebook Login":{  
         "values":[  
            "true"
         ],
         "type":"l"
      }
   }
}

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

event
string

Which event to query

callback
string

(optional) name of callback function for JSONP output

 

This api returns all segment values for all properties in drill for provided event, except from big list properties, which have too many values and are stored separately.

Suggest Edits

/o?method=segmentation_big_meta

Fetches segments for big list properties (available since 16.12)

 
gethttps://try.count.ly/o?method=segmentation_big_meta&api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o?app_id=app_id&api_key=api_key&method=segmentation_big_meta'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o',
  qs: 
   { app_id: 'app_id',
     api_key: 'api_key',
     method: 'segmentation_big_meta' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o?app_id=app_id&api_key=api_key&method=segmentation_big_meta")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o?app_id=app_id&api_key=api_key&method=segmentation_big_meta");

xhr.send(data);
import requests

url = "https://try.count.ly/o"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

[  
   "com.xiaomi.market",
   "com.hiapk.marketpho",
   "com.aliyun.wireless.vos.appstore",
   "com.lenovo.leos.appstore",
   "com.tencent.android.qqdownloader",
   "com.diguayouxi",
   "com.keenhi.mid.kitservice",
   "com.wandoujia.phoenix2",
   "com.google.vending",
   "com.miui.supermarket",
   "com.bbk.appstore",
   "com.taobao.appcenter",
   "com.huawei.appmarket",
   "com.slideme.sam.manager",
   "com.amazon.venezia",
   "com.yingyonghui.market",
   "me.onemobile.android",
   "cn.goapk.market",
   "com.nduoa.nmarket",
   "cm.aptoide.pt",
   "com.mappn.gfan",
   "com.sec.android.app.samsungapps",
   "com.android.browser",
   "com.hiapk.marketpad",
   "com.dragon.android.pandaspace",
   "com.qihoo.appstore",
   "com.android.vending",
   "com.lenovo.leos.appstore.pad",
   "com.oppo.market",
   "com.appslib.vending",
   "com.moto.mobile.appstore",
   "com.aspire.mm",
   "com.rim.marketintent",
   "com.google.android.feedback",
   "com.baidu.appsearch",
   "com.nokia.payment.iapenabler",
   "um.market.android"
]

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

event
string

Which event to query

callback
string

(optional) name of callback function for JSONP output

prop
string

Property for which to fetch data (up.src, up.lv)

search
string

Regex search in the segment values

 

Due to UI limitations by default this api outputs maximum of 200 items (configurable). But it is possible to pre filter with a regex through search parameter to return only set of values for which user is searching

Suggest Edits

/o?method=drill_bookmarks

Get bookmarked filter query from drill (available in drill plugin)

 
gethttps://try.count.ly/o?method=drill_bookmarks&api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/o?app_id=app_id&api_key=api_key&method=drill_bookmarks'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/o',
  qs: 
   { app_id: 'app_id',
     api_key: 'api_key',
     method: 'drill_bookmarks' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/o?app_id=app_id&api_key=api_key&method=drill_bookmarks")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/o?app_id=app_id&api_key=api_key&method=drill_bookmarks");

xhr.send(data);
import requests

url = "https://try.count.ly/o"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
  {
    "_id":"8cd8feb0692c558cbedeb5572615009b",
    "app_id":"542c20cdd83506df6c000068",
    "event_app_id":"4c056cb1cd6ae9a996c5314d314d4211",
    "event_key":"test1",
    "query_obj":"{\"sg.country\":{\"$in\":[\"Turkey\"]}}",
    "query_text":"country = Turkey"
  }
]

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

event_key
string

the name of event for which filter was created

callback
string

(optional) name of callback function for JSONP output

 

Retrieve bookmarked Countly Drill data query

Suggest Edits

/i/drill/add_bookmark

Add drill query to bookmarks (available in drill plugin)

 
gethttps://try.count.ly/i/drill/add_bookmark?api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/i/drill/add_bookmark?app_id=app_id&api_key=api_key'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/i/drill/add_bookmark',
  qs: { app_id: 'app_id', api_key: 'api_key' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/i/drill/add_bookmark?app_id=app_id&api_key=api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/i/drill/add_bookmark?app_id=app_id&api_key=api_key");

xhr.send(data);
import requests

url = "https://try.count.ly/i/drill/add_bookmark"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{"result":"Success"}

Query Params

api_key
string

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

event_key
string

the name of event for which filter was created

query_obj
string

JSON encoded drill query

query_text
string

Name for the query/bookmark

by_val
string

Projection key (if any)

by_val_text
string

Projection key name

callback
string

(optional) name of callback function for JSONP output

 

Add new drill bookmark

Suggest Edits

/i/drill/delete_bookmark

Remove drill bookmark (available in drill plugin)

 
gethttps://try.count.ly/i/drill/delete_bookmark?api_key=api_key&app_id=app_id
curl --request GET \
  --url 'https://try.count.ly/i/drill/delete_bookmark?api_key=api_key&app_id=app_id'
var request = require("request");

var options = { method: 'GET',
  url: 'https://try.count.ly/i/drill/delete_bookmark',
  qs: { api_key: 'api_key', app_id: 'app_id' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://try.count.ly/i/drill/delete_bookmark?api_key=api_key&app_id=app_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://try.count.ly/i/drill/delete_bookmark?api_key=api_key&app_id=app_id");

xhr.send(data);
import requests

url = "https://try.count.ly/i/drill/delete_bookmark"

querystring = {"api_key":"api_key","app_id":"app_id"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{"result":"Success"}

Query Params

api_key
string
required

API_KEY of user, with permission to access this app

app_id
string

ID of the app for which to query

bookmark_id
string

id of the bookmark to delete

 

Delete drill bookmark

Suggest Edits

/i/pushes/create

 
posthttps://try.count.ly/i/pushes/create?api_key=api_key
curl --form 'args={"apps":["APP_ID"],"platforms":["a", "i"],"tz":false,"test":true,"type":"message","messagePerLocale":{"default": "Default message","en": "Message in English","de": "... in Deutsch","ru": "... на Русском", "default|t": "Default message title", "default|0|t": "Default button 0 title", "default|0|l": "http://default.button0.link.com", "default|1|t": "Default button 1 title", "default|1|l": "http://default.button1.link.com", "ru|t": "Заголовок сообщения на Русском", "en|1|t": "Button 1 title in English"},"userConditions":{"custom.age":"18"},"locales":[{"value":"default","title":"Default","count":1,"percent":100},{"value":"en","title":"English","count":1,"percent":100}], "buttons": 2, "sound":"default","media": "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png", "source":"dash"}' https://example.com/i/pushes/create?api_key=API_KEY
A binary file was returned

You couldn't be authenticated

{
  "type":"message",
  "apps":["547df8507b67dc8918000001"],
  "appNames":["AAA"],
  "status":0,
  "platforms":["i","a"],
  "conditions":{},
  "messagePerLocale":{
    "default":"Default message",
    "en":"Message in English"
  },
  "sound":"default",
  "badge":3,
  "result":{
    "status":0,
    "total":0,
    "processed":0,
    "sent":0
  },
  "expiryDate":"2014-12-18T13:45:18.023Z",
  "created":"2014-12-11T13:45:18.022Z",
  "_id":"54899fee267e19eb2c000004",
  "locales":{
    "en":0.9,
    "default":0.1
  },
  "test":false,
  "date":"2014-12-11T13:45:18.023Z"
}
{
  "error": "Bad message type"
}

Query Params

api_key
string
required

Admin API_KEY.

Form Data

args
string
required

JSON object as string with audience data.

args._id
string

ID of prepared message if any

args.type
string
required

Message type ('message', 'data')

args.apps
array of strings
required

Array of app ID strings

args.platforms
array of strings
required

Array of platform types ('i' for iOS & 'a' for Android)

args.messagePerLocale
object

Object with message strings per each locale used or default message.

args.locales
object

Optional object, required for correct displaying of locale distribution in Countly Dashboard

args.data
object

Optional JSON data to send in message

args.userConditions
object

Conditions for app_users collections

args.sound
string

String, containing sound name to play when message arrives

args.badge
int32

Badge number to set on your app icon

args.buttons
string

Number of buttons (0 is default, 1 or 2)

args.media
string

URL of media attachment

args.url
string

Default URL to open, used when user taps on notification in drawer without tapping specific button