API return environment

The API returned project and users environment.


API return values

Once the user is authenticated, the API server will return the current working environment. Your page scripts can react using these values.

Value Description
env['api'] Account values for the API key used to instance the class.
env['api']['title'] API account title.
env['api']['contactName'] API account contact name.
env['api']['contactEmail'] API account contact email.
env['account'] The current account values. Regardless of how the API is initialized, this is the account that's using the system.
env['account']['id'] Current account ID.
env['account']['title'] Current account title.
env['account']['contactName'] Current account contact name.
env['account']['contactEmail'] Current account contact email.
env['user'] The current user values.
env['user']['id'] Current user ID.
env['user']['name'] Current user name.
env['user']['email'] Current user email.
env['user']['accountCreator'] A boolean value indicating if this user created the current account.
env['user']['roles'] An array of roles assigned to the current user.
env['user']['permissions'] An array of permissions assigned to the current user roles.
env['user']['lastLogin'] The last login timestamp (integer) of the current user.
env['user']['agreeDate'] The last agreement timestamp (integer) of the current user.
env['user']['created'] The creation timestamp (integer) of the current user.