Get top userID

Required API Key: Admin
Method signature
$client->getTopUserID()
Method signature
client.get_top_user_id()
Method signature
client.getTopUserID(callback)
Method signature
client.get_top_user_id()
Method signature
This method is not yet available in the swift api client.
Method signature
This method is not yet available in the android api client.
Method signature
client.GetTopUserID()
Method signature
This method is not yet available in the java api client.
Method signature
client.GetTopUserIDs()
Method signature
This method is not yet available in the scala api client.

About this method

Get the top 10 userIDs with the highest number of records per cluster.

The data returned will usually be a few seconds behind real-time, because userID usage may take up to a few seconds to propagate to the different clusters.

Examples

Get the top userIDs

<?php
$client->getTopUserID();
res = client.get_top_user_id()
client.getTopUserID(function (err, content) {
  if (err) throw err;

  console.log(content);
});
res = client.get_top_user_id();
var res = client.GetTopUserID();

// Asynchronous
// var res = await client.GetTopUserIDAsync();

System.Diagnostics.Debug.WriteLine(res);
Map<String, List<UserID>> res = client.getTopUserID();
res, err := client.GetTopUserIDs()
client.execute {
  get topUserID
}
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
    "https://${APPLICATION_ID}.algolia.net/1/clusters/mapping/top"

Parameters

No parameters for this method.

Response

In this section we document the JSON response returned by the API. Each language will encapsulate this response inside objects specific to the language and/or the implementation. So the actual type in your language might differ from what is documented.

JSON format

{
  "topUsers": {
    "c10-test": [
      {
        "userID": "user1",
        "nbRecords": 104,
        "dataSize": 17400
      {
        "userID": "user2",
        "nbRecords": 18,
        "dataSize": 3195
      }

    ],
    "c11-test": [
      {
        "userID": "user3",
        "nbRecords": 104,
        "dataSize": 17400
      },
      {
        "userID": "user4",
        "nbRecords": 1,
        "dataSize": 72
      }
    ]
  }
}
topUsers
key value mapping

Mapping of cluster names to top users.


User info object
userID
string

UserID of the user.

nbRecords
integer

Number of records belonging to the user.

dataSize
integer

Data size taken by the user.

Php small white
PHP
Ruby small white
Ruby
Javascript small white
JavaScript
Python small white
Python
Swift small white
iOS
Android small white
Android
Csharp small white
C#
Java small white
Java
Go small white
Go
Scala small white
Scala
Php small white
PHP
Ruby small white
Ruby
Javascript small white
JavaScript
Python small white
Python
Swift small white
iOS
Android small white
Android
Csharp small white
C#
Java small white
Java
Go small white
Go
Scala small white
Scala