Management

Users

You can retrieve information about a Mode user via the account resource. A call to account returns information like username, display name, email, avatar, etc.

See below for a full description of the information represented in account.

User object

Properties

username

required

string

name

required

string

id

required

integer

token

required

string

email

string

dataset_size_limit_mb

required

string

query_run_size_limit_mb

required

string

email_verified

boolean

avatar

required

object

user

required

boolean

space_count

integer

data_source_count

integer

trial_state

string

enum: pending active expired

membership_type

string

enum: admin limited full

payment_method_confirmed

boolean

private_definition_count

integer

private_definition_limit

integer

authorized_domains

array

items: type string

plan_code

string

enum: standard plus free

admin_data_source_connections_only

boolean

_links

required

object

_embeds

required

object

All resource responses contain a set of links that describe other related resources or actions that you can take on this resource. A link is comprised of two main pieces: its name (which describes its relationship to this resource) and its href (the URL of the related action or resource). All resources have at least a _self link which is the URL that will return a representation of this resource.

  • access_tokens
  • admins
  • all_color_palettes
  • all_memberships
  • all_spaces
  • archived_reports
  • billing_web
  • bridges
  • by_ids_reports
  • by_tokens_definitions
  • color_palette
  • color_palettes
  • data_source
  • data_source_connection_request_web
  • data_sources
  • default_categorical_palette
  • default_divergent_palette
  • default_sequential_palette
  • definition
  • definitions
  • drafts_reports
  • group
  • groups
  • home_discover_web
  • home_explorations_web
  • home_reports_web
  • home_search_web
  • home_starred_web
  • home_web
  • member_session_timeout
  • memberships
  • new_invite_web
  • new_report
  • new_report_web
  • new_upload_web
  • organizations
  • preference
  • public_data_sources
  • public_reports
  • report
  • report_views
  • reports
  • select_data_sources_web
  • self
  • slack_app
  • space
  • spaces
  • starred_reports
  • table
  • trial_appointment
  • validate_definition_name
  • validate_space_name
  • validate_table
  • viewed_reports
  • walkthrough
  • web
  • web_color_palettes_settings
  • web_data_sources_settings
  • web_groups
  • web_member_sessions
  • web_membership_events
  • web_new_organization
  • web_public_datasource_home
  • web_settings
  • web_settings_slack
  • web_settings_themes
  • web_spaces
  • web_trial_appointments

Embedded

This resource contains nested related resources.

  • all_spaces
  • data_sources
  • spaces
{
  "username": "occaecat proident Ut Excepteur commodo",
  "name": "laborum min",
  "id": 3806823,
  "token": "hjkiouytre24",
  "avatar": {
    "type": "cupidatat veniam sint et"
  },
  "user": false,
  "email": "user@example.com",
  "email_verified": false,
  "space_count": -12096092,
  "data_source_count": 84005514,
  "trial_state": "expired",
  "membership_type": "full",
  "payment_method_confirmed": false,
  "private_definition_count": -18809362,
  "private_definition_limit": 88550427,
  "authorized_domains": [],
  "plan_code": "plus",
  "admin_data_source_connections_only": true,
  "_links": {
    "self": {
      "href": "do",
      "templated": false
    },
    "web": {
      "href": "qui",
      "templated": false
    },
    "web_public_datasource_home": {
      "href": "Ut aliquip",
      "templated": false
    },
    "web_groups": {
      "href": "dolor labore",
      "templated": false
    },
    "web_new_organization": {
      "href": "Ut sed",
      "templated": false
    },
    "home_web": {
      "href": "in ut",
      "templated": false
    },
    "home_starred_web": {
      "href": "mollit ea",
      "templated": false
    },
    "home_search_web": {
      "href": "dolor",
      "templated": false
    },
    "new_invite_web": {
      "href": "nulla reprehenderit nostrud elit",
      "templated": false
    },
    "new_upload_web": {
      "href": "proident eu e",
      "templated": false
    },
    "report": {
      "href": "proident anim nostrud laborum",
      "templated": false
    },
    "reports": {
      "href": "veniam ut",
      "templated": false
    },
    "archived_reports": {
      "href": "cillum culpa occaecat eiusmod",
      "templated": false
    },
    "public_reports": {
      "href": "id sed dolore cillum",
      "templated": false
    },
    "drafts_reports": {
      "href": "quis",
      "templated": false
    },
    "starred_reports": {
      "href": "pariatur incididunt Excepteur Duis exercitation",
      "templated": false
    },
    "by_ids_reports": {
      "href": "aute reprehenderit",
      "templated": false
    },
    "viewed_reports": {
      "href": "eiusmod nulla id et esse",
      "templated": false
    },
    "all_color_palettes": {
      "href": "Duis in elit adipi",
      "templated": false
    },
    "web_settings": {
      "href": "dolore proident ullamco qui Ut",
      "templated": false
    },
    "web_data_sources_settings": {
      "href": "mol",
      "templated": false
    },
    "web_settings_slack": {
      "href": "reprehenderit consectetur est",
      "templated": false
    },
    "web_spaces": {
      "href": "culpa tempor elit ut cillum",
      "templated": false
    },
    "web_membership_events": {
      "href": "",
      "templated": false
    },
    "web_member_sessions": {
      "href": "volu",
      "templated": false
    },
    "web_domain_users": {
      "href": "dolore in",
      "templated": false
    },
    "web_settings_themes": {
      "href": "in non deserunt voluptate",
      "templated": false
    },
    "web_trial_appointments": {
      "href": "dolor veniam ut cupid",
      "templated": false
    },
    "data_sources": {
      "href": "cillum culpa tempor aute",
      "templated": false
    },
    "data_source": {
      "href": "irur",
      "templated": false
    },
    "admins": {
      "href": "ut pariatur enim sed aliquip",
      "templated": false
    },
    "memberships": {
      "href": "ad veniam",
      "templated": false
    },
    "all_memberships": {
      "href": "occaecat elit ea labore sit",
      "templated": false
    },
    "home_reports_web": {
      "href": "exe",
      "templated": false
    },
    "home_discover_web": {
      "href": "dolore nostrud eiusmod pariatur",
      "templated": false
    },
    "select_data_sources_web": {
      "href": "anim",
      "templated": false
    },
    "billing_web": {
      "href": "",
      "templated": false
    },
    "public_data_sources": {
      "href": "et laboris Ut do",
      "templated": false
    },
    "organizations": {
      "href": "ea cillum",
      "templated": false
    },
    "walkthrough": {
      "href": "laborum cupidatat",
      "templated": false
    },
    "preference": {
      "href": "proident eiusmod ex sit in",
      "templated": false
    },
    "table": {
      "href": "e",
      "templated": false
    },
    "by_tokens_definitions": {
      "href": "dolore esse Excepteur cillum",
      "templated": false
    },
    "bridges": {
      "href": "cillum",
      "templated": false
    },
    "access_tokens": {
      "href": "eu sint reprehende",
      "templated": false
    },
    "new_report": {
      "href": "Duis eu ea",
      "templated": false
    },
    "new_report_web": {
      "href": "consectetur quis",
      "templated": false
    },
    "validate_table": {
      "href": "fugiat tempor",
      "templated": false
    },
    "report_views": {
      "href": "nisi",
      "templated": false
    },
    "groups": {
      "href": "nisi consectetur proident",
      "templated": false
    },
    "group": {
      "href": "dolore nisi in non",
      "templated": false
    },
    "spaces": {
      "href": "dolore",
      "templated": false
    },
    "space": {
      "href": "esse",
      "templated": false
    },
    "all_spaces": {
      "href": "aliqua",
      "templated": false
    },
    "definitions": {
      "required": [
        "href"
      ],
      "properties": {
        "href": {
          "type": "string"
        },
        "templated": {
          "type": "boolean",
          "default": false
        }
      }
    },
    "definition": {
      "href": "esse nulla",
      "templated": false
    },
    "color_palettes": {
      "href": "sint ullamco laborum",
      "templated": false
    },
    "color_palette": {
      "href": "officia do non magna ullamco",
      "templated": false
    },
    "web_color_palettes_settings": {
      "href": "dolor sed ",
      "templated": false
    },
    "validate_space_name": {
      "href": "quis commodo ut eu labore",
      "templated": false
    },
    "validate_definition_name": {
      "href": "dolor in",
      "templated": false
    },
    "slack_app": {
      "href": "enim",
      "templated": false
    },
    "default_categorical_palette": {
      "href": "exercitation Lorem",
      "templated": false
    },
    "default_sequential_palette": {
      "href": "magna proident minim",
      "templated": false
    },
    "default_divergent_palette": {
      "href": "magna sit pariatur irure eiusmod",
      "templated": false
    },
    "trial_appointment": {
      "href": "cillum consectetur ullamco",
      "templated": false
    },
    "member_session_timeout": {
      "href": "cillum in Excepteur fugiat",
      "templated": false
    }
  },
  "_embedded": {
    "data_sources": {
      "_links": {
        "self": {
          "href": "labore dolore est velit",
          "templated": false
        },
        "next_page": {
          "href": "consectetur",
          "templated": false
        },
        "prev_page": {
          "href": "nostrud",
          "templated": false
        }
      },
      "pagination": {
        "first_page": "elit dolor nulla dolor tempor",
        "last_page": "Lorem",
        "total_pages": 70128887,
        "total_count": -76684835
      },
      "_embedded": {}
    },
    "spaces": {
      "_links": {
        "self": {
          "href": "cupidatat ipsum",
          "templated": false
        },
        "next_page": {
          "href": "cupidatat nisi",
          "templated": false
        },
        "prev_page": {
          "href": "aute sunt cillum do",
          "templated": false
        }
      },
      "pagination": {
        "first_page": "su",
        "last_page": "sit cupidatat",
        "total_pages": 30204105,
        "total_count": 15839629
      },
      "_embedded": {}
    },
    "all_spaces": {
      "_links": {
        "self": {
          "href": "cupidatat elit",
          "templated": false
        },
        "next_page": {
          "href": "et do consequat",
          "templated": false
        },
        "prev_page": {
          "href": "ut aliquip dolor",
          "templated": false
        }
      },
      "pagination": {
        "first_page": "in elit qui",
        "last_page": "aliqua ea cupidatat",
        "total_pages": 99554948,
        "total_count": -48071378
      },
      "_embedded": {}
    }
  }
}

(Not Supported) Get authorizing user

To return information about a given user’s account, send a GET request to the account resource.

This endpoint will not work with Workspace API tokens since these are associated with the Workspace and not individual users. It will continue to work with personal tokens. Use the Verify endpoint instead.

Responses

200

User response

401

Unauthorized

GET /account

curl --include \
     --header "Content-Type: application/json" \
     --header "Accept: application/hal+json" \
  'https://app.mode.com/api/account'
require 'http'

username = 'your_api_key'
password = 'your_api_secret'

headers = {
  content_type: 'application/json',
  accept:       'application/hal+json'
}

response = HTTP.basic_auth(user: username, pass: password)
               .headers(headers)
               .get('https://app.mode.com/api/account')

puts response
from urllib2 import Request, urlopen

headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/hal+json'
}
request = Request('https://app.mode.com/api/account', headers=headers)

response_body = urlopen(request).read()
print(response_body)
var request = require('request');

request({
  method: 'GET',
  url: 'https://app.mode.com/api/account',
  headers: {
    'Content-Type': 'application/json',
    'Accept': 'application/hal+json'
  }}, function (error, response, body) {
  console.log('Status:', response.statusCode);
  console.log('Headers:', JSON.stringify(response.headers));
  console.log('Response:', body);
});

Verify User

Verifies the authorizing user and returns the Workspace associated with the authorizing user.

Responses

200

Verify response

401

Unauthorized

GET /api/verify

curl --include \
     --header "Content-Type: application/json" \
     --header "Accept: application/hal+json" \
  'https://app.mode.com/api/verify'
require 'http'

username = 'your_api_key'
password = 'your_api_secret'

headers = {
  content_type: 'application/json',
  accept:       'application/hal+json'
}

response = HTTP.basic_auth(user: username, pass: password)
               .headers(headers)
               .get('https://app.mode.com/api/verify')

puts response
from urllib2 import Request, urlopen

headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/hal+json'
}
request = Request('https://app.mode.com/api/verify', headers=headers)

response_body = urlopen(request).read()
print(response_body)
var request = require('request');

request({
  method: 'GET',
  url: 'https://app.mode.com/api/verify',
  headers: {
    'Content-Type': 'application/json',
    'Accept': 'application/hal+json'
  }}, function (error, response, body) {
  console.log('Status:', response.statusCode);
  console.log('Headers:', JSON.stringify(response.headers));
  console.log('Response:', body);
});