Skip to main content

system.mes.personnel.getPerson

Retrieves a Person object from the database by its unique ID or username.

Syntax

system.mes.personnel.getPerson(idOrUsername)

Parameters

ParameterTypeNullableDescription
idStringFalseThe unique ID or username of the person to retrieve.

Returns

Returns a JSON representation of the person object if found. The following is a list of keys and typical values:

KeyTypeDescription
departmentIdStringThe department ID the person belongs to.
departmentNameStringThe name of the department.
departmentPathStringThe path of the department.
personStatusStringThe status of the person (e.g., ACTIVE).
firstNameStringThe person's first name.
lastNameStringThe person's last name.
initialsStringThe person's initials.
usernameStringThe person's username.
idStringThe unique ID of the person.
notesStringNotes about the person.
enabledBooleanWhether the person is enabled.
spare1StringSpare field for additional context.
spare2StringSpare field for additional context.
spare3StringSpare field for additional context.

Code Examples

# Retrieve a person by ID
person = system.mes.personnel.getPerson('01JAP8RJBN-8ZTPXSGY-J9GSDPE1')

# Output the JSON representation of the person
print(person)