Cleanse Entities
REST API for cleansing entities.
Request
This operation is used to cleanse an entity.
POST {TenantURL}/entities/cleanse?type={shortUriOfCleanseConfig}
Parameter | Required | Description | |
---|---|---|---|
Headers |
Authorization
|
Yes | Information about authentication access token in format "Bearer
<accessToken>" (see details in Authentication API ).
|
Query |
shortUriOfCleanseConfig
|
Yes | This parameter defines which cleanse config will be
used for entity cleansing. In the parameter value, user should provide
shortUri for one of cleanse configs defined for
EntityType in the "cleanse" section in configuration
for the current tenant. |
returnUserData
|
No | If false , does not return user data provided to
cleanse, only cleansed values. |
|
options
|
No | Comma-separated list of different options which affect entity's JSON
content in the response. Available options:
|
Response
JSON Array containing object representing cleansed object, or in case of fuzzy cleansing variants of cleansed entity based on multiple cleansed results. Fuzzy cleansing, when cleansing provides multiple results for one input, can occur for example when user didn't specified exact location, but provided address that corresponds to some amount of different places.
Request
POST {TenantURL}/entities/cleanse?type=default
Headers: Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512
{
"type": "configuration/entityTypes/Location",
"attributes": {
"AddressPaste": [
{
"type": "configuration/entityTypes/Location/attributes/AddressPaste",
"value": "Plateau du Kirchberg B.P. 1601 L-2929 Luxembourg"
}
]
}
}
Response
POST {TenantURL}/entities/cleanse?type=default
Headers: Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512
{
"uri": "entities/YkOh0FE",
"type": "configuration/entityTypes/Location",
"createdTime": 1505349008888,
"updatedTime": 1505349008888,
"attributes": {},
"isFavorite": false,
"analyticsAttributes": {},
"label": "",
"secondaryLabel": ""
}