User

Get current user

Get information about the current user. This function is only available through a JWT token.

get/api/user

Request

  • Base URL
    https://studio.edgeimpulse.com/v1
  • Auth
    • API key in header x-api-key
    • or API key in cookie jwt
    • or API key in header x-jwt-token
    • or OAuth 2
      Authorization code/v1/oauth/authorize
      Client credentials
      Implicit/v1/oauth/authorize
      Password
      Token URL/v1/oauth/token
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Query parameters

excludeProjectsboolean

If set to "true", the "projects" field is left empty (will be faster if you call this function a lot). Use getCurrentUserProjects to get the project list in a separate call.

Response

OK

successboolean required

Whether the operation succeeded

errorstring

Optional error description (set if 'success' was false)

idinteger required
usernamestring required
namestring required
emailstring required
photostring
createdstring date-time required
lastSeenstring date-time
pendingboolean required
jobTitlestring
permissionsPermission[]

List of permissions the user has

companyNamestring
activatedboolean required

Whether the user has activated their account or not.

mfaConfiguredboolean required

Whether the user has configured multi-factor authentication

stripeCustomerIdstring

Stripe customer ID, if any.

hasPendingPaymentsboolean

Whether the user has pending payments.

tier'free' | 'community-plus' | 'professional' | 'enterprise' required

The user account tier.

idpsstring[]

List of identity providers (e.g. Google, GitHub) that the user has used to sign in with

evaluationboolean

Whether this is an ephemeral evaluation account.

ambassadorboolean

Whether this user is an ambassador.

suspendedboolean required

Whether the user is suspended.

suspensionReasonstring

Detailed explanation of why the user account was suspended. This could include violations of terms of service, suspicious activity, or administrative actions.

notificationsstring[] required

List of notifications to show to the user.

subscriptionCancellationRequestDatestring date-time

The date at which the user has requested to cancel their subscription.

subscriptionDowngradeDatestring date-time

The date at which the user's subscription will be downgraded due to cancellation.

subscriptionTerminationDatestring date-time

The date at which the user's subscription will be automatically terminated due to failed payments.

payAsYouGoSubscriptionPeriodStartDatestring date-time

The start date of the current pay-as-you-go subscription period.

payAsYouGoSubscriptionPeriodEndDatestring date-time

The end date of the current pay-as-you-go subscription period.

passwordConfiguredboolean required

Whether the user has configured a password

projectsSortOrder'created-asc' | 'created-desc' | 'added-asc' | 'added-desc' | 'name-asc' | 'name-desc' | 'last-accessed-desc' required
hasEnterpriseFeaturesAccessboolean required

Whether the current user has access to enterprise features. This is true if the user is an enterprise user, or has an active enterprise trial.

timezonestring

Timezone for the user (or undefined if not specified).

privatePersonalProjectsUsedinteger required

Number of private projects created by the current user.

Example response

{
  "id": 1,
  "username": "janjongboom",
  "name": "Jan Jongboom",
  "email": "quijote@edgeimpulse.com",
  "photo": "https://usercdn.edgeimpulse.com/photos/1.jpg",
  "created": "2019-08-31T17:32:28Z",
  "lastSeen": "2019-08-31T17:32:28Z",
  "jobTitle": "Software Engineer",
  "companyName": "Edge Impulse Inc.",
  "organizations": [
    {
      "created": "2019-08-31T17:32:28Z",
      "trialId": 1,
      "trialExpiredDate": "2019-08-31T17:32:28Z",
      "trialUpgradedDate": "2019-08-31T17:32:28Z"
    }
  ],
  "projects": [
    {
      "id": 1,
      "name": "Water hammer detection",
      "created": "2019-07-21T17:32:28Z",
      "lastAccessed": "2019-07-21T17:32:28Z",
      "lastModified": "2019-07-21T17:32:28Z",
      "lastModificationDetails": "Data sample added",
      "collaborators": [
        {
          "id": 1,
          "username": "janjongboom",
          "name": "Jan Jongboom",
          "email": "quijote@edgeimpulse.com",
          "photo": "https://usercdn.edgeimpulse.com/photos/1.jpg",
          "created": "2019-08-31T17:32:28Z",
          "lastSeen": "2019-08-31T17:32:28Z",
          "jobTitle": "Software Engineer",
          "companyName": "Edge Impulse Inc."
        }
      ],
      "tags": [
        "FOMO",
        "beers"
      ]
    }
  ],
  "activeEnterpriseTrial": {
    "expirationDate": "2020-01-01T00:00:00Z",
    "notes": "This is a trial for the company's new project."
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.