profileFieldService

Defines methods used to create, access, update, and remove profile fields data. All user profile data is managed via the ProfileService.
Method Description
createProfileField Creates a new profile field.
deleteProfileField Removes a profile field from the system.
editProfileField Edits the profile field data.
editProfileFieldOptions Edits the objects for a profile field.
getDefaultFields Returns a list of all default profile fields.
getProfileField Gets a profile field object by its id.
getProfileFields Gets the list of all profile fields in the system.
setIndex Sets the index of the profile field.

createProfileField

Creates a new profile field.

POST http://domain:port/application_context/rpc/rest/profileFieldService/fields

Arguments

Name Type Description
field Contents of ProfileField the new profile field to create.

Arguments Template

<createProfileField> 
    <field>
        <!-- Contents of ProfileField -->
    <field>
</createProfileField>

Response

Type Description
ProfileField the new profile field

Response Template

<createProfileFieldResponse> 
    <return>
        <!-- Contents of ProfileField -->
    <return>
</createProfileFieldResponse>

Errors

Error When Returned
com.jivesoftware.util.AlreadyExistsException
Unauthorized if not the system admin.

deleteProfileField

Removes a profile field from the system. This method will also remove all the user data and ProfileFieldOption objects associated with the field.

DELETE http://domain:port/application_context/rpc/rest/profileFieldService/fields/{fieldID}

Arguments

Name Type Description
fieldID xs:long the id of the field to remove

Arguments Template

<deleteProfileField> 
    <fieldID>xs:long</fieldID>
</deleteProfileField>

Errors

Error When Returned
Unauthorized if not the system admin.

editProfileField

Edits the profile field data.

PUT http://domain:port/application_context/rpc/rest/profileFieldService/fields

Arguments

Name Type Description
field Contents of ProfileField the profile field to edit.

Arguments Template

<editProfileField> 
    <field>
        <!-- Contents of ProfileField -->
    <field>
</editProfileField>

Errors

Error When Returned
Unauthorized if not the system admin.

editProfileFieldOptions

Edits the objects for a profile field.

PUT http://domain:port/application_context/rpc/rest/profileFieldService/options

Arguments

Name Type Description
field Contents of ProfileField the field containing the edited objects.

Arguments Template

<editProfileFieldOptions> 
    <field>
        <!-- Contents of ProfileField -->
    <field>
</editProfileFieldOptions>

Errors

Error When Returned
Unauthorized if not the system admin.

getDefaultFields

Returns a list of all default profile fields. These fields need not be shown, but they cannot be deleted.

GET http://domain:port/application_context/rpc/rest/profileFieldService/defaultFields

Response

Type Description
List of ProfileField a list of all default profile fields. These fields need not be shown, but they cannot be deleted.

Response Template

<getDefaultFieldsResponse> 
    <!-- List of ... -->
    <return>
        <!-- Contents of ProfileField -->
    <return>
</getDefaultFieldsResponse>

getProfileField

Gets a profile field object by its id.

GET http://domain:port/application_context/rpc/rest/profileFieldService/fields/{fieldID}

Arguments

Name Type Description
fieldID xs:long the id of the profile field.

Arguments Template

<getProfileField> 
    <fieldID>xs:long</fieldID>
</getProfileField>

Response

Type Description
ProfileField the profile field object corresponding to the fieldID.

Response Template

<getProfileFieldResponse> 
    <return>
        <!-- Contents of ProfileField -->
    <return>
</getProfileFieldResponse>

getProfileFields

Gets the list of all profile fields in the system.

GET http://domain:port/application_context/rpc/rest/profileFieldService/fields

Response

Type Description
List of ProfileField a list of all profile fields in the system.

Response Template

<getProfileFieldsResponse> 
    <!-- List of ... -->
    <return>
        <!-- Contents of ProfileField -->
    <return>
</getProfileFieldsResponse>

setIndex

Sets the index of the profile field. The index value can be used to display the fields in an arbitrary order. Index values are from 0 to getProfileFields().size() - 1.

POST http://domain:port/application_context/rpc/rest/profileFieldService/index

Arguments

Name Type Description
fieldID xs:long the profile field id to adjust the index of.
newIndex xs:int the new index value for the field.

Arguments Template

<setIndex> 
    <fieldID>xs:long</fieldID>
    <newIndex>xs:int</newIndex>
</setIndex>

Errors

Error When Returned
Unauthorized if not the system admin.