Get user data

This method returns all user’s data.

URL

GET https://api.dashly.app/users/{id}

For {id} you can use:

  • Dashly ID
  • Your User ID (in case user with such ID does not exist, new user with such ID is created) (send with by_user_id=true)

Parameters

This method follows the general rules. Arguments are transmitted as GET or POST parameters.

Parameter Type Description
by_user_id Optional[boolean] Should be true in case you're using User ID instead of Dashly ID. Default: false
props Optional[boolean] Show system properties. Default: true
props_events Optional[boolean] Show properties, created by performed events. Default: false
props_custom Optional[boolean] Show custom properties. Default: false
presence_details Optional[boolean] Show detailed information on user status. Default: false
events Optional[boolean] Show properties, created by performed events (more convenient). Default: false
segments Optional[boolean] Show user’s segments. Default: false
notes Optional[boolean] Show user’s notes. Default: false
tags Optional[boolean] Show user's tags. Default: false
email_status Optional[boolean] Show user's email subscription status. Default: false
convert_props_types Optional[boolean] If false, values in props and props_custom are returned as strings. Default: true
timezone_offset Optional[boolean] Show user's timezone offset. Default: false
app Optional[ID] ID of requesting application. Default: calculated based on access token.

Notes

Most of the optional parameters doubles User optional fields inclusion but without include_ prefix. This behavior is historical and is maintained for backwards compatibility reasons.

User properties might sometimes contain long integers which are misinterpreted by browser (64-bit numbers browser interpretation). id_as_string parameter does not affect user properties. Add convert_props_types=false parameter to get all user's properties values as strings.

Response

data will contain User object.

{
  "meta": {
    "status": 200
  },
  "data": {
    "id": 96,
    "app": 1,

    "user_id": "124",

    "presence": "idle",
    "presence_details": {
      ...
    },

    "props": {
      "$name": "sdsd",
      "$email": "materkov@gmail.com",
      "$sessions": 50,
      ...
    },
    "props_events": {
      "$event_31_first": "2015-12-10T08:20:23",
      "$event_31_first": "2015-12-16T10:45:13",
      "$event_31_count": 1,
      ...
    },
    "props_custom": {
      "dao1": "value2",
      "dao2": ["9", "18", "21"],
    },

    "events": [
      {
        "first": 1450262713,
        "last": 1450265101,
        "count": 10,
        "event_type": {
          "id": 31,
          "name": "event4",
          "score": 10
        }
      },
      ...
    ],

    "notes": [
      ...
    ],

    "segments": [
      {
        "id": 4,
        "app": 1,
        "name": "Has name",
        "filters": "..."
      },
      ...
    ]
  }
}

Exceptions

Standart Web API exceptions

Example

curl -X GET  -H "Authorization: Token XXX" "https://api.dashly.app/users/8173131"