User Tools


Webservice Method Reference

Retrieve Attachment

Purpose:Retrieve file attached to a document as a base64 encoded string. This method was added instead of modifying the already existing Retrieve method to avoid having to download all attachments when only a list is required and so we wouldn't have to modify the existing interface of the retrieve method.
Profile:retrievedocattachment(id:Id,returnfile:boolean):Map
Send as:POST
Parameters:
 id: comma separated list of document identifiers to obtain
 returnfile: true if we need to really get the file, false to just get the information of the attachment
Response:A map object with all the information of the attachment
URL Format:
http://corebos_url/webservice.php?operation=retrievedocattachment&sessionName=[session id]&id=[id documento]&returnfile=[0|1]
Examples:REST Document Manipulation Enhancements

Revise

The main difference between vtws_revise and vtws_update is that for revise you can send only those fields that need to be changed, but for update API you need to send all the mandatory fields to update a record. If you send unknown fields then it will silently ignore them, the reason for this behavior is that the user may not have permission for few fields and the system may not know if these fields are not available in the system or the user does not have permission for these fields.

Filters/Views

Method:getfilterfields
Purpose:Retrieve the default list of fields to show in a list view along with the link field and pagesize
Profile:getfilterfields(module:String):Map
Send as:POST
Parameters:
 module: module name to get the fields for
Response:A map object with a list of the fields, the link fields and the default page size
URL Format:
http://corebos_url/webservice.php?operation=getfilterfields&sessionName=[session id]&module=[name]
Method:getViewsByModule
Purpose:Retrieve a list of available filters on a module with all the available information of each: fields, conditions, default, and also the link field and page size. This method is similar to getFiltersByModule being the difference one property (HTML output) and that this method applies permission based on the coreBOS Custom View Management module.
Profile:getViewsByModule(module:String):Map
Send as:POST
Parameters:
 module: module name to get the filters for
Response:A map object with a list of the filters, the link fields, and the default page size
URL Format:
http://corebos_url/webservice.php?operation=getViewsByModule&sessionName=[session id]&module=[name]
Method:getFiltersByModule
Purpose:Retrieve a list of available filters on a module with all the available information of each: fields, conditions, default, and also the link field and page size. This method is similar to getViewsByModule being the difference one property (HTML output) and that this method applies permission based on the vtigerCRM Custom View Management (filters, public and approve).
Profile:getFiltersByModule(module:String):Map
Send as:POST
Parameters:
 module: module name to get the filters for
Response:A map object with a list of the filters in HTML and array format and the link fields
URL Format:
http://corebos_url/webservice.php?operation=getFiltersByModule&sessionName=[session id]&module=[name]
Method:getPortalUserInfo
Purpose:Retrieve a list of available fields for the connected user
Profile:getPortalUserInfo():Map
Send as:POST
Parameters:
Response:'date_format','first_name','last_name','email1','id'
URL Format:
http://corebos_url/webservice.php?operation=getPortalUserInfo&sessionName=[session id]
Method:getPortalUserDateFormat
Purpose:Retrieve the date format of the connected user
Profile:getPortalUserDateFormat():Map
Send as:POST
Parameters:
Response:date_format, if none is set ISO (yyyy-mm-dd) will be returned
URL Format:
http://corebos_url/webservice.php?operation=getPortalUserDateFormat&sessionName=[session id]
Method:getAllUsers
Purpose:Retrieve a list of all existing users name
Profile:getAllUsers():Map
Send as:POST
Parameters:
Response:list of user names indexed by ID
URL Format:
http://corebos_url/webservice.php?operation=getAllUsers&sessionName=[session id]
Method:getAssignedUserList
Purpose:Retrieve a list of all users with access to a module
Profile:getAssignedUserList(module):Map
Send as:GET
Parameters:
 module: module name to get the users for
Response:list of user IDs and names
URL Format:
http://corebos_url/webservice.php?operation=getAssignedUserList&sessionName=[session id]&module=[name]
Method:getUsersInSameGroup
Purpose:return all the users in the groups that the given user is part of.
Profile:getUsersInSameGroup(id:String):Map
Send as:POST
Parameters:
 id: userid to get the group users for. Note: application ID not web service ID
Response:array user names of all the users in the groups that this user is part of indexed by their ID
URL Format:
http://corebos_url/webservice.php?operation=getUsersInSameGroup&sessionName=[session id]&id=[userid]

CRUD

Users

El API actual soporta la manipulación de usuarios como si fuera cualquier otra entidad, o sea, puedes utilizar Create, Update y Retrieve como con cualquier otra entidad. La restricción es que por fuerza ha de ser un usuario administrador el que ejecute las llamadas al igual que ocurre dentro de la aplicación.

Para poder eliminar un usuario hay que utilizar el método DeleteUser porque, al igual que dentro de la aplicación y a diferencia del Delete normal, es necesario dar el usuario destinatario de los registros asignado al usuario que vamos a eliminar.

Finalmente una nota, me han informado por encima del proyecto del portal. Lo correcto es crear Contactos para el acceso de tus clientes al portal, no usuarios. Por si es para eso que necesitas la información anterior.

https://github.com/tsolucio/coreBOSwsDevelopment/blob/master/testcode/028lib_createUser.php

https://github.com/tsolucio/coreBOSwsDevelopment/blob/master/testcode/060lib_updateUser.php

https://github.com/tsolucio/coreBOSwsDevelopment/blob/master/testcode/070lib_deleteUser.php


coreBOS Documentación