+

Search Tips   |   Advanced Search

Profiles administrative commands


ProfilesConfigService

ProfilesConfigService.checkOutConfig("/tmp", "cell_name")

Check Profiles configuration files out to a temporary directory. To get cell name:

ProfilesConfigService.showConfig()

Display current configuration settings. Before running, check out configuration files with...

    ProfilesConfigService.checkOutConfig

ProfilesConfigService.updateConfig("property", "value")

Update configuration properties.

ProfilesConfigService.checkInConfig()

Check in Profiles configuration files.

ProfilesConfigService.checkOutPolicyConfig("/tmp", "cell_name")

Check profiles-policy.xml, and profiles-policy.xsd out to temporary directory.

    ProfilesConfigService.checkOutPolicyConfig("/tmp", "ServerNode01Cell")

ProfilesConfigService.checkInPolicyConfig()

Check in the Profiles policy configuration files.


ProfilesService

ProfilesService.deletePhoto(String user_email_addr)

Delete image files associated with a user's email address. This command can be used only if the user uploaded a photo to their profile. This command removes the photo.

For example:

    ProfilesService.deletePhoto("john_doe@myco.com")

ProfilesService.disableFullReportsToCache()

Disable the full report-to chain cache capability. This command does not take any arguments.

ProfilesService.enableFullReportsToCache(startDelay, interval, schedTime)

Enable the full report-to chain cache with the specified start delay in minutes, refresh interval in minutes, and scheduled refresh time in HH:MM format.

This cache is used to populate the full report-to chain view available in a user's profile. The cache contains the specified number of top employees in the organizational pyramid; it is not intended to store an entry for each profile. It stores the profiles of those people at the top of the chain who are included in many full report-to chain views.

For example:

    ProfilesService.enableFullReportsToCache(5, 15, "23:00")

ProfilesService.findDistinctProfileTypeReferences()

List the profile types present in the Profiles database.

ProfilesService.findUndefinedProfileTypeReferences()

List the profile types present in the Profiles database, but that do not appear in profiles-types.xml.

ProfilesService.purgeEventLogsByDates(string startDate, string endDate)

Deletes event log entries created between the specified start date and end date.

Parameters:

startDate

A string that specifies the start date for the period in MM/DD/YYYY format.

endDate

A string that specifies the end date for the period in MM/DD/YYYY format.

For example:

    ProfilesService.purgeEventLogsByDates("06/21/2009", "06/26/2009")

This command deletes all the event log entries created on or after June 21st, 2009 and before June 26th, 2009 from the EVENTLOG table.

ProfilesService.purgeEventLogsByEventNameAndDates(eventName, string startDate, string endDate)

Deletes event log entries with the specified event name created between given start date and end date.

Parameters:

eventName

The type of event to remove from the EVENTLOG table. The following names are some examples of valid event names:

  • profiles.created
  • profiles.removed
  • profiles.updated
  • profiles.person.photo.updated
  • profiles.person.audio.updated
  • profiles.colleague.created
  • profiles.colleague.added
  • profiles.connection.rejected
  • profiles.person.tagged
  • profiles.person.selftagged
  • profiles.tag.removed
  • profiles.link.added
  • profiles.link.removed
  • profiles.status.updated
  • profiles.wallpost.created
  • profiles.wallpost.removed
  • profiles.wall.comment.added

For a complete list of valid event names for Profiles, refer to the Events Reference article in the API Documentation wiki.

startDate

A string that specifies the start date for the period in MM/DD/YYYY format.

endDate

A string that specifies the end date for the period in MM/DD/YYYY format.

For example:

    ProfilesService.purgeEventLogsByEventNameAndDates("profiles.colleague.created", "06/21/2009", "06/26/2009")

This command deletes all the profiles.colleague.created event log entries created on or after June 21st, 2009 and before June 26th, 2009 from the EVENTLOG table.

ProfilesService.reloadFullReportsToCache()

Forces a reload of the full report-to chain cache from the Profiles database. This command does not take any arguments.

If the full report-to cache is disabled, it cannot be reloaded. This command fails when the cache is disabled.

ProfilesService.updateDescription(String user_email_addr, String new_content_for_description_field)

Replace the existing description text associated with a user's email address with an alternate description text enclosed by double quotation marks.

Description text is information contained on the About Me tab of a user's profile.

For example:

    ProfilesService.updateDescription("ann_jones@myco.com", "Text to display in About Me tab for Ann")

Rich text cannot be entered with this command.

ProfilesService.updateExperience(String user_email_addr, String new_content_for_experience_field)

Replace the existing experience text associated with a user's email address with alternative text enclosed by double quotation marks.

Experience is the information contained in the Background area of a user's profile.

For example:

    ProfilesService.updateExperience("ann_jones@myco.com", "Text to display in Background field for Ann")

Rich text cannot be entered with this command.

ProfilesService.getRoles(String user_email_addr)

Fetch the role associated with a user's email address. The parameter is the email address of the user whose role we are retrieving.

One of the following role values are returned:

employee normal rights across the site. Cannot create content visible to external users.
employee.extended Same rights as users with the employee role. Allowed to create content visible to external users.
visitor External user. Not part of the organization.

For example:

ProfilesService.getRoles("john_doe@myco.com")
[employee]

ProfilesService.getRoles("ann_jones@myco.com")
[employee.extended]

ProfilesService.getRolesByUserId(String user_external_id)

Fetch the role associated with a user's directory ID. The user_external_id parameter is the external ID of the user whose role we are retrieving.

One of the following role values are returned:

employee Normal rights across the site. Cannot create content visible to external users.
employee.extended Same rights as users with the employee role. Allowed to create content visible to external users.
visitor External user. Not part of the organization.

For example:

ProfilesService.getRolesByUserId("8d579540")
[employee]

ProfilesService.getRolesByUserId("79659548")
[employee.extended]

ProfilesService.setRole(String user_email_addr, String role)

Set the role associated with an individual user's email address.

A user can have only one role. The existing role is replaced with the role set by this command. If the requested role is not valid or is not allowed for the user then the command fails silently and the role is not changed.

We can assign one of the following roles to internal users:

EMPLOYEE Not allowed to create content visible to external users. Resolves to the string "employee".
EMPLOYEE_EXTENDED Allowed to create content visible to external users. Resolves to the string "employee.extended".
DEFAULT_ROLE Equivalent to EMPLOYEE.

We cannot assign a role to an external user. External users have the VISITOR role, which cannot be changed.

For example:

ProfilesService.setRole("ajones277@myco.com", DEFAULT_ROLE)
setRole Command processed user role 'employee' for user ajones277@myco.com

ProfilesService.setRoleByUserId(String user_external_id, String role)

Set the role associated with a user's external ID.

A user can have only one role. The existing role is replaced with the role set by this command. If the requested role is not valid or is not allowed for the user then the command fails silently and the role is not changed.

We can assign one of the following roles to internal users:

EMPLOYEE Not allowed to create content visible to external users. Resolves to the string "employee".
EMPLOYEE_EXTENDED Allowed to create content visible to external users. Resolves to the string "employee.extended".
DEFAULT_ROLE Equivalent to EMPLOYEE.

We cannot assign a role to an external user. External users have the VISITOR role, which cannot be changed.

For example:

ProfilesService.setRoleByUserId("8e88c240", EMPLOYEE_EXTENDED)
setRole Command processed user role 'employee.extended' for user 8e88c240

ProfilesService.setBatchRole(String role, String filename)

Assign the same role to a set of users using a text file that lists valid email addresses. Each user whose email address is listed in the text file is assigned the role specified in the role parameter.

A user can have only one role. The existing role is replaced with the role set by this command. If the requested role is not valid or is not allowed for the user then the command fails silently and the role is not changed.

The following parameters are required:

role The role to assign to each user in the list.
filename Contains one valid email address per line. For hundreds of users, create several files and execute them in separate commands.

We can assign one of the following roles to internal users:

EMPLOYEE Not allowed to create content visible to external users. Resolves to the string "employee".
EMPLOYEE_EXTENDED Allowed to create content visible to external users. Resolves to the string "employee.extended".
DEFAULT_ROLE Equivalent to EMPLOYEE.

We cannot assign a role to an external user. External users have the VISITOR role, which cannot be changed.

For example:

    ProfilesService.setBatchRole(EMPLOYEE, "profiles-roles-by-email.txt")

After the values are processed, we see this confirmation:

setBatchRole request processed Command processed user role 'employee' for users [ ajones377@myco.com, ajones277@myco.com, ajones177@myco.com, JohnSmith4@myco.com, JohnSmith3@myco.com, JohnSmith2@myco.com, JohnSmith1@myco.com ]
wsadmin>

ProfilesService.setBatchRoleByUserId(String role, String filename)

Assign the same role to a set of users using a text file that lists user IDs. Each user whose ID is listed in the text file is assigned the role specified in the role parameter.

role The role to assign to each user in the list.
filename Contains one valid email address per line. For hundreds of users, create several files and execute them in separate commands.

We can assign one of the following roles to internal users:

EMPLOYEE Not allowed to create content visible to external users. Resolves to the string "employee".
EMPLOYEE_EXTENDED Allowed to create content visible to external users. Resolves to the string "employee.extended".
DEFAULT_ROLE Equivalent to EMPLOYEE.

We cannot assign a role to an external user. External users have the VISITOR role, which cannot be changed.

For example:

    ProfilesService.setBatchRoleByUserId(EMPLOYEE, "profiles-roles-by-userid.txt")

After the values are processed, we see this confirmation:

    setBatchRole request processed Command processed user role 'employee' for users [ 8d579540, 110f82c0, 8f2158c0, 5876de62 ]

Commands for managing user data

ProfilesService.activateUserByUserId(String user_external_id, updated_properties_list)

Activate the user with the specified external ID with new properties, passed as parameters in updated_properties_list. Default status is active.

ProfilesService.inactivateUser(String user_email_addr)

Deactivates the user with the specified email address.

ProfilesService.inactivateUserByUserId(String userID, userIdTransfer=None)

Deactivates the user with the specified user ID. This command has the same behavior as ProfilesService.inactivateUser, except that it takes a user ID instead of an email address as an argument.

The userIdTransfer parameter is optional.

ProfilesService.publishUserData(String user_email_addr)

ProfilesService.publishUserDataByUserId(String userID)

ProfilesService.swapUserAccessByUserId("user_to_activate","user_to_inactivate")

ProfilesService.updateUser(String user_email_addr, updated_properties_list)

ProfilesService.updateUserByUserId(String userID, updated_properties_list)


Parent topic:
Run Profiles administrative commands


Related:
Inactivate users to manage users with administrative commands
Set user roles for external collaboration
Run administrative commands
Profiles configuration properties
Administer application content