EntityDataService.svc web service (OData 3)
Depending on the request type, OData 3 protocol can return different data. Learn more about the request and response structure below.
- Request structure
- Response structure
// Request string.
method Creatio_application_address/0/ServiceModel/EntityDataService.svc/objects_collectionCollection(guid'object_id')/object_field?$parameters
// Request headers.
Accept: application/atom+xml; type=entry
Content-Type: application/json; odata=verbose
ForceUseSession: true
BPMCSRF: authentication_cookie_value
// Request body (for POST and PATCH requests).
{
"field1": "value1",
"field2": "value2",
...
}
// The status code.
Status: code
// Response body (available in GET and POST requests).
<?xml version="1.0" encoding="utf-8"?>
<feed xml:base="https://mycreatio.com/0/ServiceModel/EntityDataService.svc/" xmlns="https://www.w3.org/2005/Atom" xmlns:d="https://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="https://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<id>https://mycreatio.com/0/ServiceModel/EntityDataService.svc/data_resource</id>
<title type="text">data_resource</title>
<updated>date and time of request</updated>
<link rel="self" title="data_resource" href="data_resource" />
<entry>
metadata_data
<content type="application/xml">
<m:properties>
<d:object1 field1>object1 field_value1</d:object1 field1>
<d:object1 field2>object1 field_value2</d:object1 field2>
...
</m:properties>
</content>
</entry>
<entry>
metadata_data
<content type="application/xml">
<m:properties>
<d:object2 field1>object2 field_value1</d:object2 field1>
<d:object2 field2>object2 field_value2</d:object2 field2>
...
</m:properties>
</content>
</entry>
...
</feed>
Request string
method
Required. Creatio supports the following request methods:
GET
– retrieve dataPOST
– add dataPATCH
– modify dataDELETE
– delete data
Creatio_application_address
Creatio application URL. Required.
ServiceModel
OData 3 protocol’s web service URL. Unmodifiable part of the request. Required.
EntityDataService.svc
OData 3 protocol’s web service URL. Unmodifiable part of the request. Required.
objects_collectionCollection
Name of the database table (name of the object collection). When using the OData 3 protocol, add Collection
to the first name of the object collection in the request string (e.g., ContactCollection
). Run a query to receive the list of database tables. Required.
- Microsoft SQL
- Oracle
- PostgreSQL
SELECT * FROM INFORMATION_SCHEMA.TABLES
SELECT * FROM ALL_TABLES
SELECT table_name FROM information_schema.tables
guid'object_id' optional
The identifier of the database table record string (identifier of the collection object instance). For example, guid'00000000-0000-0000-0000-000000000000'
.
object_field optional
The database table record field (field of the collection object instance).
parameters optional
Optional OData 3 parameters you can use in the GET
Creatio request string. Use the ?
operator to specify the parameters. Add the parameter name after the $
operator. Use the &
operator to use two or more parameters.
Available values
| The field value. | |
$count=true | The number of elements in the selection. | |
$skip=n | The first n elements that must be excluded from the selection. | |
$top=n | The first n elements that must be included in the selection. | |
$select=field1,field2,... | The set of fields that must be included in the selection. | |
$orderby=field asc or $orderby=field desc | How to sort the field values in the selection. | |
$expand=field1,field2,... | Extension of the connected fields. | |
$filter=field template 'field_value' | How to filter the fields in the selection. |
Request headers
Accept application/atom+xml; type=entry
Data type to expect in the server response. The server returns the response in XML. Optional for GET
requests. Required.
Content-Type application/json; odata=verbose
Encoding and type of the resource passed in the request body. Optional for GET
requests. Required.
ForceUseSession true
The ForceUseSession
header forces the use of an existing session. You do not need to use AuthService.svc
in your request to the authentication service. Required.
BPMCSRF authentication_cookie_value
Authentication cookie. Required.
Request body
field1, field2, ...
The names of the fields passed in the request body. Required.
value1, value2, ...
The values of the field1, field2, …
fields passed in the request body. Required.
HTTP status code
code
Response status code.
Status codes
200 OK |
|
201 Created |
|
202 Accepted | Processing of the data update request has started but has not finished yet. The response body should contain the |
204 No content | Data update request. The value of the requested resource is 0. The response body should be empty. |
3xx Redirection | Data update request. The redirection means the client must take further actions to execute the request. The response should contain the |
4xx Client Error | Incorrect requests. The server returns this code in response to client errors and requests to non-existent resources, such as entities, entity collections, or properties. If the response body is defined for the error code, the error body will be as defined for the corresponding format. |
404 Not Found | The object or collection specified in the URL does not exist. The response body should be empty. |
Response body
entry
The instance of the collection object.
metadata_data
The properties of the collection object instance.
object1 field1, object1 field2, ..., object2 field1, object2 field2, ...
The names of the field1, field2, …
fields in the object1, object2, …
collection object instances.
object1 field_value1, object1 field_value2, ..., object2 field_value1, object2 field_value2, ...
The values of the field1, field2, …
fields in the object1, object2, …
collection object instances.
Resources
Request headers (official OData 3 documentation)
Request parameters (official OData 3 documentation)