soap/SoapSugarUsers.php

Show: inherited
    Table of Contents

    Functions

    functionget_available_modules( String $session ) : Array

    Retrieve the list of available modules on the system available to the currently logged in user.

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    Returns
    Type Description
    Array 'modules' -- An array of module names 'error' -- The SOAP error, if any
    functionget_document_revision( String $session, String $id ) : \return_document_revision

    This method is used as a result of the .htaccess lock down on the cache directory. It will allow a properly authenticated user to download a document that they have proper rights to download.

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    $id String

    -- ID of the document revision to obtain

    Returns
    Type Description
    \return_document_revision - this is a complex type as defined in SoapTypes.php
    functionget_entries( String $session, String $module_name, Array $ids, Array $select_fields ) : Array

    Retrieve a list of SugarBean's based on provided IDs.

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    $module_name String

    -- The name of the module to return records from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

    $ids Array

    -- An array of SugarBean IDs.

    $select_fields Array

    -- A list of the fields to be included in the results. This optional parameter allows for only needed fields to be retrieved.

    Returns
    Type Description
    Array 'field_list' -- Var def information about the returned fields 'entry_list' -- The records that were retrieved 'error' -- The SOAP error, if any
    functionget_entries_count( \session $session, \module_name $module_name, \query $query, \deleted $deleted ) : \get_entries_count_result

    Retrieve number of records in a given module

    Parameters
    Name Type Description
    $session \session

    the session id of the authenticated user

    $module_name \module_name

    module to retrieve number of records from

    $query \query

    allows webservice user to provide a WHERE clause

    $deleted \deleted

    specify whether or not to include deleted records

    Returns
    Type Description
    \get_entries_count_result - this is a complex type as defined in SoapTypes.php
    functionget_entry( String $session, String $module_name, String $id, Array $select_fields ) : \unknown

    Retrieve a single SugarBean based on ID.

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    $module_name String

    -- The name of the module to return records from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

    $id String

    -- The SugarBean's ID value.

    $select_fields Array

    -- A list of the fields to be included in the results. This optional parameter allows for only needed fields to be retrieved.

    Returns
    Type Description
    \unknown
    functionget_entry_list( String $session, String $module_name, String $query, String $order_by, String $offset, Array $select_fields, String $max_results, \Number $deleted ) : Array

    Retrieve a list of beans. This is the primary method for getting list of SugarBeans from Sugar using the SOAP API.

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    $module_name String

    -- The name of the module to return records from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

    $query String

    -- SQL where clause without the word 'where'

    $order_by String

    -- SQL order by clause without the phrase 'order by'

    $offset String

    -- The record offset to start from.

    $select_fields Array

    -- A list of the fields to be included in the results. This optional parameter allows for only needed fields to be retrieved.

    $max_results String

    -- The maximum number of records to return. The default is the sugar configuration value for 'list_max_entries_per_page'

    $deleted \Number

    -- false if deleted records should not be include, true if deleted records should be included.

    Returns
    Type Description
    Array 'result_count' -- The number of records returned 'next_offset' -- The start of the next page (This will always be the previous offset plus the number of rows returned. It does not indicate if there is additional data unless you calculate that the next_offset happens to be closer than it should be. 'field_list' -- The vardef information on the selected fields. Array -- 'field'=> 'name' -- the name of the field 'type' -- the data type of the field 'label' -- the translation key for the label of the field 'required' -- Is the field required? 'options' -- Possible values for a drop down field 'entry_list' -- The records that were retrieved 'error' -- The SOAP error, if any
    functionget_gmt_time( ) : String

    Return the current time on the server in the format 'Y-m-d H:i:s'. This time is in GMT.

    Returns
    Type Description
    String -- The current date/time 'Y-m-d H:i:s'
    functionget_mailmerge_document( String $session, \unknown_type $file_name, \unknown_type $fields ) : \unknown

    Get MailMerge document

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    $file_name \unknown_type
    $fields \unknown_type
    Returns
    Type Description
    \unknown
    functionget_mailmerge_document2( String $session, \unknown_type $file_name, \unknown_type $fields ) : \unknown

    Enter description here...

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    $file_name \unknown_type
    $fields \unknown_type
    Returns
    Type Description
    \unknown
    functionget_module_fields( String $session, String $module_name ) : Array

    Retrieve vardef information on the fields of the specified bean.

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    $module_name String

    -- The name of the module to return records from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

    Returns
    Type Description
    Array 'module_fields' -- The vardef information on the selected fields. 'error' -- The SOAP error, if any
    functionget_note_attachment( String | String $session, String $id ) : ArrayArray

    Retrieve an attachment from a note

    Parameters
    Name Type Description
    $session String | String

    -- Session ID returned by a previous call to login.

    $id String

    -- The ID of the appropriate Note.

    Returns
    Type Description
    ArrayArray 'id' -- The ID of the new note or -1 on error 'error' -- The SOAP error if any.'note_attachment' -- Array String 'id' -- The ID of the Note containing the attachment String 'filename' -- The file name of the attachment Binary 'file' -- The binary contents of the file. 'error' -- The SOAP error if any.
    functionget_related_notes( String $session, String $module_name, String $module_id, Array $select_fields ) : Array

    Retrieve the collection of notes that are related to a bean.

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    $module_name String

    -- The name of the module to return records from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

    $module_id String

    -- The ID of the bean that you want to associate the note with

    $select_fields Array

    -- A list of the fields to be included in the results. This optional parameter allows for only needed fields to be retrieved.

    Returns
    Type Description
    Array 'result_count' -- The number of records returned (-1 on error) 'next_offset' -- The start of the next page (This will always be the previous offset plus the number of rows returned. It does not indicate if there is additional data unless you calculate that the next_offset happens to be closer than it should be. 'field_list' -- The vardef information on the selected fields. 'entry_list' -- The records that were retrieved 'error' -- The SOAP error, if any
    functionget_relationships( String $session, String $module_name, String $module_id, String $related_module, String $related_module_query, \Number $deleted ) : \unknown

    Retrieve a collection of beans tha are related to the specified bean.

    As of 4.5.1c, all combinations of related modules are supported

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    $module_name String

    -- The name of the module that the primary record is from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

    $module_id String

    -- The ID of the bean in the specified module

    $related_module String

    -- The name of the related module to return records from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

    $related_module_query String

    -- A portion of the where clause of the SQL statement to find the related items. The SQL query will already be filtered to only include the beans that are related to the specified bean.

    $deleted \Number

    -- false if deleted records should not be include, true if deleted records should be included.

    Returns
    Type Description
    \unknown
    functionget_server_time( ) : String

    Return the current time on the server in the format 'Y-m-d H:i:s'. This time is in the server's default timezone.

    Returns
    Type Description
    String -- The current date/time 'Y-m-d H:i:s'
    functionget_server_version( ) : String

    Retrieve the version number of Sugar that the server is running.

    Returns
    Type Description
    String -- The current sugar version number. '1.0' on error.
    functionget_sugar_flavor( ) : String

    Retrieve the specific flavor of sugar.

    Returns
    Type Description
    String 'CE' -- For Community Edition 'PRO' -- For Professional 'ENT' -- For Enterprise
    functionget_user_id( String $session ) : String

    Return the user_id of the user that is logged into the current session.

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    Returns
    Type Description
    String -- the User ID of the current session -1 on error.
    functionget_user_team_id( String $session ) : String

    Return the ID of the default team for the user that is logged into the current session.

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    Returns
    Type Description
    String -- the Team ID of the current user's default team 1 for Community Edition -1 on error.
    functionhandle_set_entries(  $module_name,  $name_value_lists,  $select_fields = FALSE ) : void

    Parameters
    Name Type Description
    $module_name
    $name_value_lists
    $select_fields
    functionhandle_set_relationship( Array $set_relationship_value,  $session = '' ) : \Empty

    (Internal) Create a relationship between two beans.

    Parameters
    Name Type Description
    $set_relationship_value Array

    -- 'module1' -- The name of the module that the primary record is from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method).. 'module1_id' -- The ID of the bean in the specified module 'module2' -- The name of the module that the related record is from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method).. 'module2_id' -- The ID of the bean in the specified module

    $session
    Returns
    Type Description
    \Empty error on success, Error on failure
    functionis_loopback( ) : truefalse

    Check to see if the soap server and client are on the same machine.

    We don't allow a server to sync to itself.

    Returns
    Type Description
    truefalse -- if the SOAP server and client are on the same machine-- if the SOAP server and client are not on the same machine.
    functionis_user_admin( String $session ) : int

    Return if the user is an admin or not

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    Returns
    Type Description
    int 1 or 0 depending on if the user is an admin
    functionis_valid_ip_address( string $session_var ) : bool

    Use the same logic as in SugarAuthenticate to validate the ip address

    Parameters
    Name Type Description
    $session_var string
    Returns
    Type Description
    bool - true if the ip address is valid, false otherwise.
    functionlogin( \UserAuth $user_auth, String $application ) : \Array(session_id,

    Log the user into the application

    Parameters
    Name Type Description
    $user_auth \UserAuth

    array $user_auth -- Set user_name and password (password needs to be in the right encoding for the type of authentication the user is setup for. For Base sugar validation, password is the MD5 sum of the plain text password.

    $application String

    -- The name of the application you are logging in from. (Currently unused).

    Returns
    Type Description
    \Array(session_id, error) -- session_id is the id of the session that was created. Error is set if there was any error during creation.
    functionlogout( String $session ) : \Empty

    Log out of the session. This will destroy the session and prevent other's from using it.

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    Returns
    Type Description
    \Empty error on success, Error on failure
    functionrelate_note_to_module( String $session, String $note_id, String $module_name, String $module_id ) : \no

    Attach a note to another bean. Once you have created a note to store an attachment, the note needs to be related to the bean.

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    $note_id String

    -- The ID of the note that you want to associate with a bean

    $module_name String

    -- The name of the module to return records from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

    $module_id String

    -- The ID of the bean that you want to associate the note with

    Returns
    Type Description
    \no error for success, error for failure
    functionseamless_login( String $session ) : truefalse

    Perform a seamless login. This is used internally during the sync process.

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    Returns
    Type Description
    truefalse -- if the session was authenticated-- if the session could not be authenticated
    functionsearch_by_module( string $user_name, string $password, string $search_string, \string[] $modules, int $offset, int $max_results ) : \get_entry_list_result

    Given a list of modules to search and a search string, return the id, module_name, along with the fields as specified in the $query_array

    Parameters
    Name Type Description
    $user_name string
    • username of the Sugar User
    $password string
    • password of the Sugar User
    $search_string string
    • string to search
    $modules \string[]
    • array of modules to query
    $offset int
    • a specified offset in the query
    $max_results int
    • max number of records to return
    Returns
    Type Description
    \get_entry_list_result - id, module_name, and list of fields from each record
    functionset_campaign_merge( \session $session, \targets $targets, \campaign_id $campaign_id ) : \error_value

    Once we have successfuly done a mail merge on a campaign, we need to notify Sugar of the targets and the campaign_id for tracking purposes

    Parameters
    Name Type Description
    $session \session

    the session id of the authenticated user

    $targets \targets

    a string array of ids identifying the targets used in the merge

    $campaign_id \campaign_id

    the campaign_id used for the merge

    Returns
    Type Description
    \error_value
    functionset_document_revision( String $session, \unknown_type $document_revision ) : \unknown

    Enter description here...

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    $document_revision \unknown_type
    Returns
    Type Description
    \unknown
    functionset_entries( String $session, String $module_name, Array $name_value_lists ) : Array

    Update or create a list of SugarBeans

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    $module_name String

    -- The name of the module to return records from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

    $name_value_lists Array

    -- Array of Bean specific Arrays where the keys of the array are the SugarBean attributes, the values of the array are the values the attributes should have.

    Returns
    Type Description
    Array 'ids' -- Array of the IDs of the beans that was written to (-1 on error) 'error' -- The SOAP error if any.
    functionset_entries_details( String $session, String $module_name, Array $name_value_lists, Array $select_fields ) : Array

    Update or create a list of SugarBeans, returning details about the records created/updated

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    $module_name String

    -- The name of the module to return records from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

    $name_value_lists Array

    -- Array of Bean specific Arrays where the keys of the array are the SugarBean attributes, the values of the array are the values the attributes should have.

    $select_fields Array

    -- A list of the fields to be included in the results. This optional parameter allows for only needed fields to be retrieved.

    Returns
    Type Description
    Array 'name_value_lists' -- Array of Bean specific Arrays where the keys of the array are the SugarBean attributes, the values of the array are the values the attributes should have. 'error' -- The SOAP error if any.
    functionset_entry( String $session, String $module_name, Array $name_value_list ) : Array

    Update or create a single SugarBean.

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    $module_name String

    -- The name of the module to return records from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

    $name_value_list Array

    -- The keys of the array are the SugarBean attributes, the values of the array are the values the attributes should have.

    Returns
    Type Description
    Array 'id' -- the ID of the bean that was written to (-1 on error) 'error' -- The SOAP error if any.
    functionset_note_attachment( String $session, \Binary $note ) : Array

    Add or replace the attachment on a Note.

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    $note \Binary

    -- The flie contents of the attachment.

    Returns
    Type Description
    Array 'id' -- The ID of the new note or -1 on error 'error' -- The SOAP error if any.
    functionset_relationship( String $session, Array $set_relationship_value ) : \Empty

    Set a single relationship between two beans. The items are related by module name and id.

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    $set_relationship_value Array

    -- 'module1' -- The name of the module that the primary record is from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method).. 'module1_id' -- The ID of the bean in the specified module 'module2' -- The name of the module that the related record is from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method).. 'module2_id' -- The ID of the bean in the specified module

    Returns
    Type Description
    \Empty error on success, Error on failure
    functionset_relationships( String $session, Array $set_relationship_list ) : \Empty

    Setup several relationships between pairs of beans. The items are related by module name and id.

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    $set_relationship_list Array

    -- One for each relationship to setup. Each entry is itself an array. 'module1' -- The name of the module that the primary record is from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method).. 'module1_id' -- The ID of the bean in the specified module 'module2' -- The name of the module that the related record is from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method).. 'module2_id' -- The ID of the bean in the specified module

    Returns
    Type Description
    \Empty error on success, Error on failure
    functionupdate_portal_user( String $session, String $portal_name, Array $name_value_list ) : \Empty

    Update the properties of a contact that is portal user. Add the portal user name to the user's properties.

    Parameters
    Name Type Description
    $session String

    -- Session ID returned by a previous call to login.

    $portal_name String

    -- The portal user_name of the contact

    $name_value_list Array

    -- collection of 'name'=>'value' pairs for finding the contact

    Returns
    Type Description
    \Empty error on success, Error on failure
    functionvalidate_authenticated( String $session_id ) : truefalse

    Validate the provided session information is correct and current. Load the session.

    Parameters
    Name Type Description
    $session_id String

    -- The session ID that was returned by a call to login.

    Returns
    Type Description
    truefalse -- If the session is valid and loaded.-- if the session is not valid.
    Documentation was generated by DocBlox 0.18.1.