Webservice Manual in English
Webservice Manual in English
3.4
» Webservice Manual
January 2022
Author Tecnoteca srl
www.tecnoteca.com
ENG
www.cmdbuild.org
Webservice Manual
No part of this document may be reproduced, in whole or in part, without the express written permission
of Tecnoteca s.r.l.
CMDBuild ® uses many great technologies from the open source community:
PostgreSQL, Apache, Tomcat, Eclipse, Ext JS, JasperSoft, JasperStudio, Enhydra Shark, TWE, OCS
Inventory, Liferay, Alfresco, GeoServer, OpenLayers, Quartz, BiMserver.
We are thankful for the great contributions that led to the creation of these products.
Contents
1. Introduction.................................................................................................................................................. 6
1.1. The application.................................................................................................................................... 6
1.2. Official website..................................................................................................................................... 7
1.3. CMDBuild modules.............................................................................................................................. 7
1.4. Available manuals................................................................................................................................ 7
1.5. Applications based on CMDBuild......................................................................................................... 7
2. Interoperability standards............................................................................................................................. 9
2.1. Service-Oriented Architecture (SOA)................................................................................................... 9
3. Web services............................................................................................................................................. 10
3.1. Web Service introduction................................................................................................................... 10
3.2. SOAP Web Service introduction........................................................................................................ 10
3.3. REST Web Service introduction........................................................................................................ 11
4. SOAP Web Services.................................................................................................................................. 13
4.1. CMDBuild WSDL............................................................................................................................... 13
4.2. SOAP Functions................................................................................................................................ 13
4.2.1. Cards............................................................................................................................................................ 13
4.2.2. Sessions....................................................................................................................................................... 14
4.2.3. Lookups........................................................................................................................................................ 14
4.2.4. Attributes....................................................................................................................................................... 15
4.2.5. Relations....................................................................................................................................................... 15
4.2.6. Classes......................................................................................................................................................... 16
4.2.7. Functions...................................................................................................................................................... 16
4.2.8. Attachments.................................................................................................................................................. 16
4.2.9. Reports......................................................................................................................................................... 17
4.2.10. Other functions........................................................................................................................................... 17
5. REST Web Services.................................................................................................................................. 19
5.1. CMDBuild REST web service............................................................................................................ 19
5.2. CMDBuild REST Endpoints............................................................................................................... 19
5.2.1. Async Operation........................................................................................................................................... 20
5.2.2. Audits............................................................................................................................................................ 20
5.2.3. Bim project.................................................................................................................................................... 20
5.2.4. Bim values.................................................................................................................................................... 21
5.2.5. Boot............................................................................................................................................................... 21
5.2.6. Calendar Event Attachments........................................................................................................................ 21
5.2.7. Calendar Event Email................................................................................................................................... 22
5.2.8. Calendar Event............................................................................................................................................. 23
5.2.9. Calendar Sequence...................................................................................................................................... 24
5.2.10. Calendar Trigger......................................................................................................................................... 25
5.2.11. Calendar View Event.................................................................................................................................. 26
5.2.12. Card Attachments....................................................................................................................................... 26
5.2.13. Card Bim values......................................................................................................................................... 27
5.2.14. Card email attachments.............................................................................................................................. 27
5.2.15. Card email................................................................................................................................................... 28
5.2.16. Card geo values.......................................................................................................................................... 29
5.2.17. Card history................................................................................................................................................. 30
5.2.18. Card locks................................................................................................................................................... 30
5.2.19. Card print.................................................................................................................................................... 30
5.2.20. Card relations............................................................................................................................................. 30
5.2.21. Cards.......................................................................................................................................................... 31
5.2.22. Charset....................................................................................................................................................... 32
5.2.23. Chat messages........................................................................................................................................... 32
5.2.24. Chat peers.................................................................................................................................................. 32
5.2.25. Class attributes........................................................................................................................................... 32
5.2.26. Class filters................................................................................................................................................. 34
1. Introduction
1.1. The application
CMDBuild is an open source web environment for the configuration of custom applications for the
Asset Management.
On the one hand, it provides native mechanisms for the administrator, implemented in a "core"
code which has been kept separated from the business logic, so that the system can be configured
with all its features.
On the other hand, it generates dynamically a web interface for the operators, so that they can
keep the asset situation under control and always know their composition, detachment, functional
relations and how they update, in order to manage their life-cycle in a comprehensive way.
The system administrator can build and extend his/her own CMDB (hence the name of the project),
modeling the CMDB according to the company needs; a proper interface allows you to
progressively add new classes of items, new attributes and new relations. You can also define
filters, "views" and access permissions limited to rows and columns of every class.
Using external visual editors, the administrator can design workflows, import them into CMDBuild
and put them at operators' disposal, so that they can execute them according to the configured
automatisms.
In a similar way, using external visual editors, the administrator can design various reports on
CMDB data (printouts, graphs, barcode labels, etc.), import them into the system and put them at
operators' disposal.
The administrator can also configure some dashboards made up of charts which immediately show the
situation of some indicators in the current system (KPI).
A task manager included in the user interface of the Administration Module allows you to schedule
various operations (process starts, e-mail receiving and sending, connector executions) and to
control CMDB data (synchronous and asynchronous events). Based on their findings, it sends
notifications, starts workflows and executes scripts.
Thanks to document management systems that support the CMIS standard (Content Management
Interoperability Services) - among which there is also the open source solution Alfresco - you will
be able to attach documents, pictures, videos and other files.
Moreover, you can use GIS features to georeference and display assets on a geographical map
(external map services) and / or on vector maps (local GeoServer and spatial database PostGIS)
and BIM features to view 3D models (IFC format).
The system also includes a REST webservice, so that CMDBuild users can implement custom
interoperability solutions with external systems.
Furthermore, CMDBuild includes two external frameworks:
• the Advanced Connector CMDBuild, which is written in Java and can be configured in
Groovy: it helps the implementation of connectors with external data sources, i.e automatic
inventory systems, virtualization or monitoring ones (supplied with non-open source licence
to the users that subscribe the annual Subscription with Tecnoteca)
• the GUI Framework CMDBuild, which helps the implementation of additional graphical
interfaces, i.e. web pages (simplified for non technicians) that have to be published on
external portals and that are able to interact with the CMDB through the REST webservice
CMDBuild includes a mobile interface (for smartphone and tablet). It is implemented as multi-
platform app (iOS, Android) and is able to interact with the CMDB through the REST webservice
(supplied with non-open source licence to the users that subscribe the annual Subscription with
Tecnoteca).
CMDBuild is an enterprise system: server-side Java, web Ajax GUI, SOA architecture (Service
Oriented Architecture), based on webservice and implemented by using the best open source
technologies and following the sector standards.
CMDBuild is an ever-evolving system, which has been released for the first time in 2006 and
updated several times a year in order to offer more features and to support new technologies.
activities (http://www.openmaint.org)
Both applications are released with open source license, except for certain external components
(data sync connectors, Self-Service portal, mobile APP, etc.), that are reserved to the users that
subscribe the annual Subscription with Tecnoteca.
2. Interoperability standards
2.1. Service-Oriented Architecture (SOA)
In order to make different applications interoperable,
they must be created as components that cooperate
with the services implementation, and these services
must be set through high level interfaces defined under
standard protocols.
CMDBuild is designed with Service-Oriented
Architecture (SOA):
• decoupling the different logic levels (see the
schema)
• implementing and setting in every interface
external specifications as a single modality for
the access to relating data and methods
• using the interfaces both for the interactive
access of the web client and for the
programmatic access of external applications
From a technical point of view, we chose to use the
following technology of web services:
1. REST protocol
2. SOAP protocol
Through web services, and safety policy permitting, CMDBuild provides the data filed in the CMDB
and its management methods to allow the use within other applications involved with the
information itself, both for the technical management and for administration.
3. Web services
3.1. Web Service introduction
A web service is an interface that describes a collection of methods, available over a network and
working using XML messages or Json messages.
With web services, an application allows other applications to interact with its methods.
Nowadays the two most used standards are:
• SOAP Web Services
• REST Web Services
In the following chapters both standards will be introduced, with a list of their differences and some
examples.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soap="http://soap.services.cmdbuild.org">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-
secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-
wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-
200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
</wsse:UsernameToken></wsse:Security>
<soapenv:Header/>
<soapenv:Body>
<soap:createSession/>
</soapenv:Body>
</soapenv:Envelope>
When executing a SOAP request, the target endpoint, in the CMDBuild case, has to be the
Private.wsdl file in the CMDBuild installation. The WSDL file provides the user with a list of all
available functions that can be called.
For a more detailed description on what you can do with SOAP on CMDBuild read chapter 4.
When REST is used, requests can be sent to various endpoints through GET, PUT, POST and
DELETE HTTP requests.
Elements such as authentication tokens can be added in the header of the request, data that has
to be sent through PUT or POST requests can be added as parameters of the request.
As an example, if we want to generate a session like we previously did with the SOAP web service,
we would firstly need to get the session endpoint of CMDBuild:
http://hostname:port/cmdbuild/services/rest/v3/sessions
And than perform a POST request with the username and password of the user to authenticate.
The response would than contain a success key followed by a data key containing the response
values (from version 3.2 due to security reasons an additional request parameter has to be set to
true in order to obtain the sessionId in the response, more at chapter 5.3.1):
{
“success”:”true”,
“data”:[”sessionId”:”generatedSessionId”,
“username”:”user”,
“password”:”userPassword”]
}
For a more detailed description on what you can do with REST on CMDBuild read chapter 5.
4.2.1. Cards
Card data structure:
• className: a string that identifies the owner class
• id: a bigint to identify the card
• attributeList: an array of attributes of the card
• beginDate: a date that shows the creation date of the card
• user: a string that shows what user last modified the card
Function Parameters Description
getCard -className Function used to obtain the information relative to a
-cardId specific card owned by a specific class
-attributeList
getCardHistory -className Function used to obtain the history of a specific
-cardId card owned by a specific class. With limit and offset
-limit the amount of results can be modified
-offset
getCardList -className Function used to obtain a full list of cards owned by
-attributeList a specific class, with the possibility of specifing a
-queryType filter (with Query type, FullTextQuery or CqlQuery),
-orderType with the possibility of controlling the number and
-limit order of results via Limit, Offset and Order list
-offset
-fullTextQuery
-cqlQuery
getCardListExt -className Function used to obtain a full extended list of cards
-attributeList owned by a specific class, with the possibility of
-queryType specifing a filter (with Query type, FullTextQuery or
-orderType CqlQuery), with the possibility of controlling the
-limit number and order of results via Limit, Offset and
-offset Order list
-fullTextQuery
-cqlQuery
getCardListWithLongDat -className Function used to obtain a full list of cards owned by
eFormat -attributeList a specific class with a long date format, with the
-queryType possibility of specifing a filter (with Query type,
-orderType FullTextQuery or CqlQuery), with the possibility of
-limit controlling the number and order of results via
-offset Limit, Offset and Order list
-fullTextQuery
-cqlQuery
getCardMenuSchema
createCard -className Create a card owned by the specified class with a
-attributeList list of attributes specified in the request
-beginDate
-endDate
-metadata
updateCard -className Update a card owned by the specified class with
-attributeList the values specified in the request
-beginDate
-endDate
-id
-metadata
deleteCard -className Delete a specific card owned by a specific class
-cardId
4.2.2. Sessions
Function Parameters Description
createSession Create a session for the user with username and
password specified in the header
4.2.3. Lookups
Lookup data structure:
• id: a bigint to identify the lookup
• type: a string to identify the name of the lookup list which includes the current heading
• description; a string to describe the lookup heading
• code
• parent: the parent of the current lookup
• parentId: the id of the parent of the current lookup
• position: the position of the lookup in the lookup list
• notes: a string containing the optional notes of the lookup
Function Parameters Description
getLookupById -id Get a specific lookup by specifing its Id
getLookList Get the full list of lookups
getLookListByCode -type Get the list of lookups of a specific type with a
-code specific code
createLookup -code Create a new lookup with the values defined in the
4.2.4. Attributes
Attribute data structure:
• name: a string that defines the attribute name
• value: a string to identify the attribute value
• code
Function Parameters Description
getAttributeList -className Get a list of attributes of the class specified with the
class name parameter
4.2.5. Relations
Relation data structure:
• domainName: a string that defines the domain used for the relation
• class1Name: a string to identify the first class of the relation
• card1Id: a bigint to identify the first card of the relation
• class2Name: a string to identify the second class of the relation
• card2Id: a bigint to identify the second card of the relation
Function Parameters Description
getRelationAttributes -class1Name Get the attributes of a specific relation
-class2Name
-card1Id
-card2Id
-domainName
getRelationHistory -class1Name Get the history of a specific relation
-class2Name
-card1Id
-card2Id
-domainName
getRelationList -className Get the full list of relations of a specific card owned
-cardId by the class specified by Class name
getRelationListExt -domain Get the full extended list of relations of a specific
-className card owned by the class specified by Class name
-cardId
createRelation -class1Name Create a relation between the two classes and two
-class2Name cards specified in the parameters
-card1Id
-card2Id
-domainName
createRelationWithAttrib -class1Name Create a relation between the two classes and two
utes -class2Name cards specified in the parameters with the provided
-card1Id list f attributes
-card2Id
-domainName
-attributes
updateRelationAttributes -class1Name Update the attributes owned by the relation
-class2Name between the specified cards and classes provided
-card1Id in the parameters
-card2Id
-domainName
-attributes
deleteRelation -class1Name Delete the specified relation
-class2Name
-card1Id
-card2Id
-domainName
4.2.6. Classes
Function Parameters Description
getClassSchema -className Get the schema of a the class with the name
specified in the parameters
getClassSchemaById -classId Get the schema of a the class with the id specified
-includeAttributes in the parameters and, optionally, include its
attributes
getClassSchemaByNam -flassName Get the schema of a the class with the name
e specified in the parameters
4.2.7. Functions
Function Parameters Description
callFunction -functionName Execute the specified function
-code
-name
-value
getFunctionList Obtain a list of all available functions
4.2.8. Attachments
Attachment data structure:
• category: a string that identifies the category of the attribute
• description: a string that reppresent the description of the attachment
• filename: a string that contains the name of the file with the extension
• version: a string containing the version of the attachment
• author: a string containing the author of the upload
• created: a date indicating when the file was firstly uploaed
4.2.9. Reports
Function Parameters Description
getBuiltInReport -id Get a report with the specified id and extension
-extension
-params
getReport -id Get a report with the specified id and extension
-extension
-params
getReportList -type Get a full list of reports of the specified type
-limit
-offset
getReportParameters -id Obtain a list of all report parameters for the
-extension specified report with the specified extension
notify
resumeWorkflow -card Resume the workflow of a card
suspendWorkflow -card Suspend the workflow of a card
updateWorkflow -card Update the workflow of a card
sync -xml
5.2.2. Audits
Base url: http://hostname:port/cmdbuild/services/rest/v3/system/audit
json
-file
multipart dataHandler
/{projectId}/file -ifcFormat GET Download the specified Ifc file for
String the specified Bim project
/{projectId}/file -file POST Upload a new Ifc file for the
dataHandler specified Bim project
-ifcFormat
String
/{projectId} DELETE Delete the specified bim project
/{projectId}/convert/xkt POST Update the specified bim project
from ifc to xkt
* {projectId}: Long id of the bim project
* {globalId}: String id of the bim value
5.2.5. Boot
Base url: http://hostname:port/cmdbuild/services/rest/v3/boot
Boolean
/{eventId}/history/recordId GET Obtain the details of a specific
record from the history of an event
/print/{file} -StandardQueryParams GET Obtain a report of all events (it is
-extension possible to filter the events with
String the standard query parameters)
-attributes
String
* {eventId}: Long id of the event
String
-wsQueryOption GET Obtain a list of all the
attachments for the specified
card
/{attachmentId} GET Obtain a single attachment with
the specified attachmentId
/{attachmentId}/download GET Download the file of a specific
attachment
/_MANY/file -attachmentId GET Obtain many attachments file
List<String> based on the id list
/{attachmentId}/preview GET Get the attachment preview if
available
/{attachmentId} -attachment PUT Update a specific attachment
attachmentData with the provided data
-file
DataHandler
/{attachmentId} DELETE Delete an attachment with the
specified id
/{attachmentId}/history GET Obtain the history of a specific
attachment
/{attachmentId}/history/ GET Get an older version of a specific
version/file attachment
* {attachmentId}: String id of the attachment
• promptSynchronization boolean
• status String
• _expr String
5.2.21. Cards
Base url: http://hostname:port/cmdbuild/services/rest/v3/classes/classId/cards
Card data structure:
The data structure for a card is a map of string and objects that vary based on the class definition
5.2.22. Charset
Base url: http://hostname:port/cmdbuild/services/rest/v3/syste,/charsets
• showSeparators boolean
• type String
• name String
• description String
• showInGrid boolean
• showInReducedGrid boolean
• domainKey String
• domain String
• direction String
• unique boolean
• mandatory boolean
• active boolean
• index Integer
• defaultValue String
• group String
• precision String
• scale String
• targetClass String
• maxLenght Integer
• editorType String
• lookupType String
• filter String
• help String
• showIf String
• validationRules String
• mode boolean
• autoValue String
• metadata map<String, String>
• classOrder Integer
• isMasterDetail Boolean
• masterDetailDescription String
• ipType String
• textContentSecurity String
Long
-data POST Create a new attribute for a
json specific class with the provided
data
/{attributeId} -data PUT Update an existing attribute with
json the provided data
/{attributeId} DELETE Delete a specific attribute
/order -attrOrder POST Reorder the list of attributes for a
List<String> specific class with the new order
set in the parameter attrOrder
* {attributeId}: Long id of the message
5.2.30. Classes
Base url: http://hostname:port/cmdbuild/services/rest/v3/classes
Class data structure:
• name String
• description String
• defaultFilter Long
• defaultImportTemplate Long
• defaultExportTemplate Long
• _icon Long
• validationRule String
• type String
• allowedExtensions String
• checkCount String
• checkCountNumber String
• maxFileSize Int
• messageAttr String
• flowStatusAttr String
• engine String
• parent String
• active Boolean
• prototype Boolean
• noteInline Boolean
• noteInlineClosed Boolean
• attachmentsInline Boolean
• attachmentsInlineClosed Boolean
• enableSaveButton Boolean
• dmsCategory String
• multitenantMode String
• stoppableByUser Boolean
• formTriggers List<ClassDataFormTrigger>
• contextMenuItems List<ContextMenuItems>
• widgets List<Widgets>
• attributeGroups List<AttributeGroups>
• domainOrder List<String>
• help String
• formStructure JsonNode
Path Parameters Type Description
-detailed GET Obtain a list of every available
Boolean class
-limit
Long
-start
Long
-filter
String
/{classId} GET Get the details of a specific class
5.2.31. Configurations
Base url: http://hostname:port/cmdbuild/services/rest/v3/configuration
Path Parameters Type Description
/public GET Obtain the public configuration
/system GET Obtain the system configuration
{targetDevice}/file String
-parameters
String
* {customPageId}: Long id of the custom page
* {targetDevice}: Target device of the custom page
5.2.35. Dashboard
Base url: http://hostname:port/cmdbuild/services/rest/v3/dashboards
Dashboard data structure:
• name String
• description String
• active boolean
• charts Object
• layout Object
• classOrder Integer
• isMasterDetail Boolean
• masterDetailDescription String
• ipType String
• textContentSecurity String
5.2.40. Domains
Base url: http://hostname:port/cmdbuild/services/rest/v3/domains
Domain data structure:
• source String
• name String
• description String
• destination String
• cardinality String
• descriptionDirect String
• descriptionInverse String
• indexDirect int
• indexInverse int
• descripttionMasterDetail String
• filterMasterDetail String
• disabledSourceDescendants List<String>
• disabledDestinationDescendants List<String>
• masterDetailAggregateAttrs List<String
• active boolean
• isMasterDetail boolean
• sourceInline Boolean
• sourceDefaultClosed Boolean
• destinationInline Boolean
• destinationDefaultClosed Boolean
• cascadeActionDirect_askConfirm Boolean
• cascadeActionInverse_askConfirm Boolean
• cascadeActionDirect String
• cascadeActionInverse String
• imap_starttls boolean
Long
-start
Long
-detailed
Boolean
/{signatureId} GET Get the details of a specific email
signature
-emailSignatureData POST Create a new email signature
json with the provided data
/{signatureId} -emailSignatureData PUT Update an existing email
json signature with the provided data
/{signatureId} DELETE Delete a specific email signature
* {signatureId}: Long Id of the email signature
-includeBindings
Boolean
/{templateId} GET Get the details of a specific
template
-data POST Create a new email template
json with the provided data
/{templateId} -data PUT Update an existing template with
json the provided data
/{templateId} DELETE Delete an existing email template
* {templateId}: Long Id of the email template
• allowPublicAccess Boolean
• enabled Boolean
• config Map<String, String>
• handlers List<Map<String, String>>
Path Parameters Type Description
-limit GET Obtain a list of all Etl gates
Long
-offset
Long
-detailed
boolean
by-class/{classId} -StandardQueryParams GET Obtain a list of etl gates for a
-include_etl_templates class
boolean
/{gateId} GET Get the details of a specific etl
gate
-date POST Create a new Etl gate with the
json provided data
/{gateId} -data PUT Update an existing Etl gate with
json the provided data
/{gateId} DELETE Remove an existing Etl gate
* {gateId}: Long Id of the etl gate
* {classId}: String Id of the class
• description String
• targetName String
• targetType String
• source String
• exportFilter String
• mergeMode String
• mergeMode_when_missing_update_attr String
• mergeMode_when_missing_update_value String
• active Boolean
• enableCreate Boolean
• type String
• useHeader Boolean
• ignoreColumnOrder Boolean
• dataRow Integer
• firstCol Integer
• charset String
• csv_separator String
• importKeyAttributes Object
• filter JsonNode
• columns List<EtlColumnData>
• dateFormat String
• timeFormat String
• decimalSeparator String
• thousandsSeparator String
• handleMissingRecordOnError Boolean
• attributes List<AttributeData>
Path Parameters Type Description
-StandardQueryParams GET Obtain all etl templates
/by-class/{classId} -StandardQueryParams GET Obtain all etl templates for a
-include_related_domains specific class
boolean
/by-process/{classId} -StandardQueryParams GET Obtain all etl templates for a
-include_related_domains specific process
boolean
/by-view/{viewId} -StandardQueryParams GET Obtain all etl templates for a
-include_related_domains specific view
boolean
/{templateId} GET Get the details of a specific
template
/{templateId}/export -filterStr GET Execute an export using a
String template
/{templateId}/export/fileName
/{templateId}/import -dile POST Execute an import using a
dataHandler template
-detailed_report
boolean
-data POST Create a new etl template
json
/{templateId} -data PUT Update an existing etl template
json
/{templateId} DELETE Delete an existing template
/inline/export -data POST
String
/inline/export/fileName -config
json
/inline/import -file POST
dataHandler
-config
json
* {classId}: String Id of the class
* {viewId}: Long Id of the view
* {templateId}: Long Id of the template
5.2.49. Fk Domain
Base url: http://hostname:port/cmdbuild/services/rest/v3/fkdomains
5.2.50. Functions
Base url:http://hostname:port/cmdbuild/services/rest/v3/functions
DataHandler
/{layerId} DELETE Delete an existing geo server
layer with the provided data
* {layerId}: Long Id of the layer
5.2.55. Grants
Base url: http://hostname:port/cmdbuild/services/rest/v3/roles/roleId/grants
Grant data structure:
• mode String
• objectType String
• objectTypeName String
• filter String
• attributePrivileges Map<String, String>
5.2.56. Impersonation
Base url: http://hostname:port/cmdbuild/services/rest/v3/sessions/current/impersonate
Path Parameters Type Description
/username POST Impersonate a specific user with
the provided username
DELETE Stop the current impersonation
5.2.57. Jobs
Base url: http://hostname:port/cmdbuild/services/rest/v3/jobs
Job data structure:
• code String
• description String
• type String
• enabled boolean
• config Map<String, Object>
Path Parameters Type Description
-limit GET Obtain a list of every Job
Long available
-start
Long
/{jobId} GET Get the details of a specific job
-data POST Create a new job with the
json provided data
/{jobId} -data PUT Update an existing job with the
json provided data
/{jobId} DELETE Delete a specific existing job
/{jobId}/run POST Run a specific job
/{jobId}/runs -limit GET Get a list of every execution of a
Long specific job
-start
Long
/{jobId}/errors -limit GET Get a list of all the errors
Long generated by a specific job
-start
Long
/_ANY/runs -limit GET Get a list of every run of every
Long job
-start
Long
/_ANY/errors -limit GET Get a list of all the errors
Long generated by all jobs
-start
Long
/{jobId}/runs/{runId] GET Get the details of a specific run
of a specific job
5.2.59. Languages
Base url: http://hostname:port/cmdbuild/services/rest/v3/languages
5.2.60. Locks
Base url: http://hostname:port/cmdbuild/services/rest/v3/locks
• icon_color String
5.2.63. Menu
Base url: http://hostname:port/cmdbuild/services/rest/v3/menu
Menu Node data structure:
• _id String
• menuType MenuItemType
• objectTypeName String
• objectDescription String
• children List<MenuNodes>
Menu Root Node data structure:
• group String
• children List<MenuNodes>
• type String
• device String
5.2.64. Minions
Base url: http://hostname:port/cmdbuild/services/rest/v3/system_services
• _activity String
5.2.74. Processes
Base url: http://hostname:port/cmdbuild/services/rest/v3/processes
Path Parameters Type Description
-activeOnly GET Obtain a list of every available
Boolean process
-limit
Long
-start
Long
-detailed
Boolean
/{processId} GET Get the details of a specific
process
-data POST Create a new process with the
json provided data
/{processId} -data PUT Update an existing process with
json the provided data
/{processId} DELETE Delete an existing process
/{processId}/versions -file POST Upload a new xpdl
DataHandler
/{processId}/migration -provider POST Upload a new xpdl and force the
String process to use the new xpdl
-file version
DataHandler
/{processId}/versions GET Obtain a list of all xpdl version
/{processId}/versions/planId/ GET Obtain an xpdl file
file
/{processId}/template GET Obtain an xpdl template file
* {processId}: Long Id of the process
5.2.76. Relations
Base url: http://hostname:port/cmdbuild/services/rest/v3/domains/domainId/relations
Path Parameters Type Description
-limit GET Obtain a list of all available
Long relations for a specific domain
-start
Long
-detailed
Boolean
/{relationId} GET Get the details of a specific
relation
-data POST Create a new relation with the
json provided data
/{relationId} -data PUT Update an existing relation with
json the provided data
/{relationId} DELETE Delete a specific relation
/_ANY/move -data POST Move the specified relation
json
/_ANY/copy -data POST Copy a specific relation
json
* {relationId}: Long Id of the relation
5.2.77. Reports
Base url: http://hostname:port/cmdbuild/services/rest/v3/reports
Report data structure:
• _id Long
• code String
• description String
• _description_translation String
• active boolean
• title String
• query String
Path Parameters Type Description
-filter GET Obtain a list of all available
String reports
-limit
Long
-start
Long
-detailed
Boolean
5.2.78. Resources
Base url: http://hostname:port/cmdbuild/services/rest/v3/resources
5.2.80. Roles
Base url: http://hostname:port/cmdbuild/services/rest/v3/roles
Role data structure:
• type String
• name String
• description String
• email String
• active boolean
• processWidgetAlwaysEnabled boolean
• startingClass String
5.2.81. Search
Base url: http://hostname:port/cmdbuild/services/rest/v3/search
Path Parameters Type Description
/itemType -StandardQueryOptions GET
/itemType1/itemType2 -StandardQueryOptions GET
5.2.84. Sessions
Base url: http://hostname:port/cmdbuild/services/rest/v3/sessions
Session data structure:
• username String
• password String
• role String
• scope String
• device String
• tenant Long
• ignoreTenants Boolean
• activeTenants List<Long>
Path Parameters Type Description
-data POST Create a new session with the
json provided data
-includeExtendedData
Boolean
-scopeStr
String
-returnId
Boolean
/{sessionId} -include GET Get the details of a specific
ExtendedData session
Boolean
/{sessionId}/privileges GET Get the details of the privileges
of a specific session
GET Obtain a list of all available
sessions
/{sessionId} -data PUT Update an existing session with
json the provided data
-includeExtendedData
Boolean
/{sessionId} DELETE Delete an existing session
/all DELETE Delete all existing sessions
/{sessionId}/keepalive POST Keep a session alive
* {sessionId}: String session id
5.2.86. System
Base url: http://hostname:port/cmdbuild/services/rest/v3/system
Path Parameters Type Description
/status GET Obtain a list of the system
services status
/cluster/status GET Get the status of the cluster
system
/cache/drop POST Invalidate all system cache
/cache/cacheId/drop POST Invalidate a specific cache
/cache/stats GET Obtain a list of the cache
statuses
/stop POST Stop the CMDBuild system
/reload POST Reload the CMDBuild system
/restart POST Restart the CMDBuild system
/upgrade -file POST Upgrade the CMDBuild system
DataHandler with the provided file
/audit/drop POST Drop the audits of the system
/audit/cleanup POST Cleanup the audits of the system
/patches GET Obtain a list of all patches
/tenants GET Obtain a list of all available
tenants
/scheduler/jobs GET Obtain a list of all the jobs
available in the scheduler
/scheduler/job/jobId/trigger POST Trigger the execution of a job
/loggers GET Obtain a list of all available
loggers
5.2.87. Tenants
Base url: http://hostname:port/cmdbuild/services/rest/v3/tenants
5.2.88. Timezones
Base url: http://hostname:port/cmdbuild/services/rest/v3/timezones
Path Parameters Type Description
GET Obtain a list of all available
timezones
5.2.89. Translations
Base url: http://hostname:port/cmdbuild/services/rest/v3/translations
Path Parameters Type Description
5.2.90. Uploads
Base url: http://hostname:port/cmdbuild/services/rest/v3/uploads
Upload item data structure:
• path String
• description String
Path Parameters Type Description
-dir GET Obtain a list of all available files
String in a specific directory
/fileId GET Get the details of a specific file
/fileId/file: GET Download a specific file
/_MANY/file:.zip -dir GET Download multiple specified files
/_ANY/file:.zip GET Download all available files
-file POST Load a new file in the system
DataHandler
-directoryPath
String
/_MANY -dataHandler POST Load a zip file containing one or
DataHandler more files
/fileId -file PUT Update an existing file with the
DataHandler provided data
/fileId DELETE Delete a specific file
5.2.91. Users
Base url: http://hostname:port/cmdbuild/services/rest/v3/users
User data structure:
• username String
• description String
• email String
• password String
• initialPage String
• changePasswordRequired Boolean
• active boolean
• service boolean
• language String
• multiGroup boolean
• multiTenant boolean
• multiTenantActivationPrivileges String
• defaultUserGroup Long
• userTenants List<TenantInfo>
• userGroups List<UserRole>
Path Parameters Type Description
-filter GET Obtain a list of all available users
String with the possibility of filtering the
-sort results with filter, sort, limit and
String offset
-limit
Long
-start
Long
-detailed
Boolean
/{userId} GET Get the details of a specific user
-data POST Create a new user with the
json provided data
/{userId} -data PUT Update an existing user with the
json provided data
/current/password -data PUT Update the password of the
json current user with the provided
data
/{userId}/password POST
/{userId}/password/recovery POST
* {userId}: String user id
5.2.93. Views
Base url: http://hostname:port/cmdbuild/services/rest/v3/views
View data structure:
• name String
• description String
• sourceClassName String
• sourceFunction String
• filter String
• active Boolean
• shared Boolean
• type String
• masterClass String
• masterClassAlias String
• sorter JsonNode
• join List<JoinElement>
• attributes List<JoinAttribute>
• attributeGroups List<JoinAttributeGroup>
• formStructure JsonNode
• contxtMenuItems List<ClassDataContextMenuItem>
Path Parameters Type Description
GET Obtain a list of all available views
/{viewId} GET Get the details of a specified
view
-data POST Create a new view with the
json provided data
/{viewId} -data PUT Update an existing view with the
json provided data
/{viewId} DELETE Delete an existing view
* {viewId}: Long view id
5.2.94. Widget
Base url: http://hostname:port/cmdbuild/services/rest/v3/components/widget
Widget data structure:
• description String
• active Boolean
Path Parameters Type Description
GET Obtain the list of all widgets
/{widgetId} GET Obtain the details of a specific
widget
/{widgetId} DELETE Delete the specific widget
/{widgetId}/{targetDevice} DELETE Delete the specific widget for the
provided targetDevice
/{widgetId}/version/file GET Obtain the file of the specified
widget
-widgetData POST Create a new widget with the
json specified data
-file
dataHandler
/{widgetId} -widgetData PUT Update the specific widget with
json the provided data
-file
dataHandler
In this paragraph various examples of REST calls will be presented. Note that CMDBuild in this
scenario is configured with the database: demo.dump.xz, so if you want to replicate the same
examples with the same data you must load that dump first.
To perform the following examples various tools can be used, via terminal with curl on linux
operating systems, or with the support of a graphical interface with programs like Postman, or any
other software that can perform HTTP requests.
Every request requires the user to specify in the header the field “Cmdbuild-authorization”, that
field is a session token generated when creating a session, the first example request will show how
to obtain that through a specific request.
],
...
}
}
An inactive session will be deleted after a certain amount of time, causing the user to re-create the
session every once in a while.
With futher requests users can provide the generated id (the value in the field _id) in the header to
obtain access to every rest endpoint.
"description_attribute_name": "Description",
"metadata": {},
"_icon": null
},
. . .
,
"meta": {
"total": 24
}
}
In the response of multiple items at the bottom of the response a “meta” field will always be
provided, various information such as the number of total results can be found here.
Note that the parameters previously described in the documentation can be provided (in this case
the available parameters are activeOnly, detailed, limit and offset). If, for example, we wanted the
amount of results to be limited to two the request would look the same with the addition of the
parameter in the endpoint like:
http://hostname:port/cmdbuild/services/rest/v3/classes?
scope=service&limit=2
The same with the addition of other parameters.
The response will contain the information of only that class like shown in the response with every
class:
HTTP/1.1 200 OK
Content-Type:application/json
{
“success”: true,
“data” : {
“_id”:“Invoice”,
"name": "Invoice",
"description": "Invoice",
"_description_translation": "Invoice",
"prototype": false,
"parent": "Class",
"active": true,
"type": "standard",
. . .
6. Appendix: Glossary
6.1.1. ATTACHMENT
An attachment is a file associated to a card.
In order to manage the attachments, CMDBuild uses in embedded mode any document system
which is compatible with the standard protocol CMIS (or the DMS Alfresco until the version 3
through its native webservice).
The management of the attachments supports the versioning of those files that have been uploaded
a few times, with automatic numbering.
6.1.3. ATTRIBUTE
The term refers to an attribute of a CMDBuild class.
CMDBuild allows you to create new attributes (in classes and domains) or edit existing ones.
For example, in "supplier" class the attributes are: name, address, phone number, etc..
Each attribute corresponds, in the Management Module, to a form field and to a column in the
database.
See also: Class, Domain, Report, Superclass, Attribute Type
6.1.4. BIM
Method with the aim to support the whole life cycle of a building: from its construction, use and
maintenance, to its demolition, if any.
The BIM method (Building Information Modeling) is supported by several IT programs that can
interact through an open format for data exchange, called IFC (Industry Foundation Classes).
See also: GIS
6.1.5. CI
We define CI (Configuration Item) each item that provides IT service to the user and has a
sufficient detail level for its technical management.
CI examples include: server, workstation, software, operating system, printer, etc.
See also: Configuration
6.1.6. CLASS
A Class is a complex data type having a set of attributes that describe that kind of data.
A Class models an object that has to be managed in the CMDB, such as a computer, a software, a
service provider, etc.
CMDBuild allows the administrator - with the Administration Module - to define new classes or
delete / edit existing ones.
Classes are represented by cards and, in the database, by tables automatically created at the
definition time.
See also: Card, Attribute
6.1.7. CONFIGURATION
The configuration management process is designed to keep updated and available to other
processes the items (CI) information, their relations and their history.
It is one of the major ITIL processes managed by the application.
See also: CI, ITIL
6.1.8. DASHBOARD
In CMDBuild, a dashboard corresponds to a collection of different charts, in this way you can
immediately hold in evidence some key parameters (KPI) related to a particular management
aspect of the IT service.
See also: Report
6.1.9. DATABASE
The term refers to a structured collection of information, hosted on a server, as well as utility
software that handle this information for tasks such as initialization, allocation, optimization,
backup, etc..
CMDBuild relies on PostgreSQL, the most powerful, reliable, professional and open source
database , and uses its advanced features and object-oriented structure.
6.1.10. DOMAIN
A domain is a relation between two classes.
A domain has a name, two descriptions (direct and inverse), classes codes, cardinality and
attributes.
The system administrator, using the Administration Module, is able to define new domains or
delete / edit existing ones.
It is possible to define custom attributes for each domain.
See also: Class, Relation
6.1.12. GIS
A GIS is a system able to produce, manage and analyse spatial data by associating geographic
elements to one or more alphanumeric descriptions.
GIS functionalities in CMDBuild allow you to create geometric attributes (in addition to standard
attributes) that represent, on plans / maps, markers position (assets), polylines (cable lines) and
polygons (floors, rooms, etc.).
See also: BIM
6.1.14. ITIL
"Best practices" system that established a "standard de facto"; it is a nonproprietary system for the
management of IT services, following a process-oriented schema (Information Technology
Infrastructure Library).
ITIL processes include: Service Support, Incident Management, Problem Management, Change
Management, Configuration Management and Release Management.
For each process, ITIL handles description, basic components, criteria and tools for quality
management, roles and responsibilities of the resources involved, integration points with other
processes (to avoid duplications and inefficiencies).
See also: Configuration
6.1.15. LOOKUP
The term "Lookup" refers to a pair of values (Code, Description) set by the administrator in the
Administration Module.
These values are used to bind the user's choice (at the form filling time) to one of the preset
values.
With the Administration Module it is possible to define new "LookUp" tables according to
organization needs.
6.1.16. MOBILE
It is a user interface for mobile tools (smartphones and tablets). It is implemented as multi-platform
app (iOS, Android) and can be used with the CMDB through the REST webservice.
See also: GUI Framework, Webservice
6.1.17. PROCESS
The term "process" (or workflow) refers to a sequence of steps that realize an action.
Each process will take place on specific assets and will be performed by specific users.
A process is activated by starting a new process (filling related form) and ends when the last
6.1.18. RELATION
A relation is a link between two CMDBuild cards or, in other words, an instance of a given domain.
A relation is defined by a pair of unique card identifiers, a domain and attributes (if any).
CMDBuild allows users, through the Management Module, to define new relations among the
cards stored in the database.
See also: Class, Domain
6.1.19. REPORT
The term refers to a document (PDF or CSV) containing information extracted from one or more
classes and related domains.
CMDBuild users run reports by using the Management Module; reports definitions are stored in the
database.
See also: Class, Domain, Database
6.1.20. CARD
The term "card" refers to an element stored in a class.
A card is defined by a set of values, i.e. the attributes defined for its class.
CMDBuild users, through the Management Module, are able to store new cards and update /
delete existing ones.
Card information is stored in the database and, more exactly, in the table/columns created for that
class (Administration Module).
See also: Class, Attribute
6.1.21. SUPERCLASS
A superclass is an abstract class used to define attributes shared between classes. From the
abstract class you can derive real classes that contain data and include both shared attributes
(specified in the superclass) and specific subclass attributes.
For example, you can define the superclass "Computer" with some basic attributes (RAM, HD,
etc.) and then define derived subclasses "Desktop", "Notebook", "Server", each one with some
specific attributes.
See also: Class, Attribute
6.1.23. VIEW
A view not only includes the whole content of a CMDB class, it is a group of cards defined in a
logical way.
In particular, a view can be defined in CMDBuild by applying a filter to a class (so it will contain a
reduced set of the same rows) or specifying an SQL function which extracts attributes from one or
more related classes.
The first view type maintains all functionalities available for a class, the second one allows the sole
display and search with fast filter.
See also: Class, Filter
6.1.24. WEBSERVICE
A webservice is an interface that describes a collection of methods, available over a network and
working using XML messages.
With webservices, an application allows other applications to interact with its methods.
CMDBuild includes a SOAP and a REST webservice.
6.1.25. WIDGET
A widget is a component of a GUI that improves user interaction with the application.
CMDBuild uses widgets (presented as "buttons") that can be placed on cards or processes. The
buttons open popup windows that allow you to insert additional information, and then display the
output of the selected function.