The Creatio DataService web service is a RESTfull service. RESTful is a quite simple information management interface that doesn't use any additional internal layers, i.e., the data doesn't need to be converted to any third-party format, such as XML. In a simple RESTful service, each record is uniquely identified by a global identifier such as URL. Each URL, in turn, has a strictly specified format. However, this service is not always convenient for transferring large amounts of data.
With the use of the DataService, the data can be automatically configured in various data formats such as XML, JSON, HTML, CSV, and JSV. The data structure is determined by data contracts.
The full list and description of the DataService data contracts is displayed on table.
| Service | Description |
|---|---|
| InsertQuery | Add section record query class. |
| UpdateQuery | Update section record query class. |
| DeleteQuery | Delete section record query class. |
| SelectQuery | Select section record query class. |
| BatchQuery | Package query class. |
| Filters | Filter class. |
Restrictions when using DataService
When using DataService, take into account the following restrictions:
- Maximum number of records that you can obtain by request is specified in the MaxEntityRowCount (the default value is 20000). You can change the system setting value in the .\Terrasoft.WebApp\Web.config file.
- The number of requests is unlimited.
Example implementation algorithm
1. Add button to the Contacts section
For this particular case, you need to create a replacement client module of the Contacts section.

In the created client schema, add the InsertQueryContactButtonCaption localizable string, and set the "Add contact" value to it.

Add a configuration object with the button location settings to the diff array.
2. Add the processing method for the button click event
In order for a record with the necessary data to be added when a button created in the section is clicked, add the following method to the methods section of the replacement client schema:
The implementation of the InsertQuery class for the client part of the application kernel is different from the implementation of the InsertQuery in its back end. So, to create the parameters, the setParameterValue method is used, and for the query execution — the execute method. Learn about all the available properties and methods of the InsertQuery class implemented in the kernel client part in the API documentation.
Example implementation algorithm
1. Add a button in the Contacts section
Create a replacing client module of the Contacts section.

In the created client schema, add SelectQueryContactButtonCaption localizable string and set its value to Select contacts.

Add a configuration object with the settings determining the button position to the diff array.
2. Add handler method for the button pressing event
To enable reading the records when the button is clicked, add the following method to the methods section of the replacing client schema:
In the client of the application core, there is not a class like the server core SelectQuery class. To select data from a section, use the Terrasoft.EntitySchemaQuery class. For more information on this class methods and properties are described in the API documentation.