Profile

The profile service is for listing, creating and alteration of profiles.


Deprecated

To navigate the tree structure use tree.fetchNode

fetchAll

array profile.fetchAll( void )

Requests a list of profiles. This method has no parameters to specify as it will request all profiles regardless of the position within the folder hierarchy.

Return Values

Returns an array of associative arrays. For the possible returned elements see #find



fetchAllWithFields

array profile.fetchAllWithFields( void )

Requests a list of profiles. This method has no parameters to specify as it will request all profiles regardless of the position within the folder hierarchy.

Return Values

Returns an array of associative arrays. Returns the same elements as #find, but with an additional element fields which contains data as returned by profile_field.fetchAll.



find

array profile.find( int profileId )

Requests the profile details of the single profile ID requested.

Parameters

profileId

ID of the profile you're requesting.

Return Values

Returns an associative array. The possible returned elements are as follows:

Name

Type

Description

profile_id

int

Profile Id

folder_id

int

Folder the profile is attached to

name

string

Name of the Profile



insert

int profile.insert( array data )

Inserts a new profile into the given folder. Profile names must be alpha-numeric.

Parameters

data

Name

Required

Type

Description

name

yes

string

What you want to name the profile

folder_id

yes

int

The folder under which the profile should be created

If you want to create the profile in the root profile folder, set the folder_id as 'profile'.

Resource limit

The number of Profiles allowed in the system is limited to 40. This method will return an error if this is exceeded.

Return Values

Returns an int type. The id of the newly created profile.



update

bool profile.update( int profileId, array data )

Updates an existing profile using the data specified.

Parameters

data

Name

Required

Type

Description

name

no

string

New name for the profile

folder_id

no

int

Id of the folder to which to move the profile

Return Values

Returns a bool. True on success.



delete

int profile.delete( int profileId )

Deletes the specified profile.

Parameters

profileId

ID of the profile you want to delete.

Return Values

Returns a bool. True on success.

Service

profile

Methods