Service Board > Max for Developers > Appendix B: Max REST API > REST API Version 2: Currently Logged-In User
REST API Version 2: Currently Logged-In User
REST API Endpoints Summary
Action
Method
Input
Output
Parameters
Read logged-in user record
GET
/v2/user
JSON representation of the record.
fields
Read Currently Logged-In User Record
Method
GET
URL
/v2/user
Parameters
fields
Response Content Type
application/json
Parameters
Parameter
Description
Data Type
Example
fields
The fields of the object to retrieve. Eager loading is supported in depth, and fields in related records can be eager-loaded if there is a relationship between records.
If not specified, all fields are retrieved. This has the same effect as specifying a wildcard (*) character.
String
Retrieve only the Username and Email field values from a User record:
/v2/user?fields=io_username,io_email
Response Example
The response is a JSON representation of the currently logged-in User record. Following is an example Status Code 200 response that shows the system administrator is the currently logged-in user:
{
"__object_identifier": "io_user",
"io_updated_by": "764f0869-8b2a-4e43-8f23-88f593863eff",
"io_active": true,
"io_tags": null,
"io_description": null,
"io_last_name": "Administrator",
"io_username": "system",
"io_overrides": null,
"io_first_name": "System",
"io_deleted": false,
"io_private": false,
"io_full_name": "System Administrator",
"io_last_login_on": "2017-03-03T11:22:41.071-03:00",
"io_platform_changes_permitted": [
"57ca1b3d-fdcb-4339-a7ab-02e66b45c970"
],
"io_created_on": "2012-06-28T01:48:55.187-03:00",
"io_custodian": "c9d336e0-824c-4be1-9bf2-feff5261b69e",
"io_short_description": null,
"io_primary_role_or_group": [
"c930a100-ef14-4c02-8148-c436caa35631",
"cb590533-0dbe-3a79-b818-6da3989dc465"
],
"io_user_parameters": "4d765f27-8971-4a38-b635-580cace083c1",
"io_updated_on": "2016-07-30T13:18:31.189-03:00",
"io_owner": "764f0869-8b2a-4e43-8f23-88f593863eff",
"io_documentation": [
[
"en",
"The System Administrator User is the default System Administrator for the Instance. This User must not be modified nor removed."
]
],
"io_folder": null,
"io_package": "d949dc70-cb55-11e0-9572-0800200c9a66",
"io_release_status": [
"a3b8456c-2250-4b1b-9e7b-ef7449265e61"
],
"io_notes": null,
"io_release": "a594a8fe-ea82-443f-afe7-dcd42abf6183",
"io_uuid": "764f0869-8b2a-4e43-8f23-88f593863eff",
"io_external_id": null,
"io_created_by": "764f0869-8b2a-4e43-8f23-88f593863eff",
"io_authenticated": true,
"io_password": "********************",
"io_email": "system@servicemax.com",
"io_path": null,
"io_related_contact": "db6f97d1-1ef5-11e1-8bc2-0800200c9a66",
"io_application": "6c0f1c54-71dd-4271-8865-d17f14cea59f",
"io_require_password_change_upon_next_login": false
}
* 
Each returned record includes the __object_identifier pseudo-field, which contains the full identifier for the object to which the record belongs.
Response Messages
HTTP Status Code
Error Message
400
SMQL query error
400
Serialization error
404
Entity not found
500
Internal Server error
Access Control
This REST API endpoint respects access control and permissions for each record. Data that users lack permissions to read is not returned. All authenticated users (for example, with the Standard User role) can execute this REST endpoint.
Input Examples
Retrieve the currently logged-in User record:
GET https:///v2/user
Retrieve the currently logged-in User record, load only a subset of its fields, and eager-load the first name of the related contact:
GET https:///v2/user?fields=io_username,io_email,io_related_contact.io_first_name
For more information:
Was this helpful?