Retrieve statuses of allowed additional features before login
This functionality is available for Creatio 8.3.1 and later.
Use the AnonymousFeatureService.svc web service to retrieve allowed additional features before user login. It returns the statuses of additional features from a predefined, strictly limited whitelist using the same DTOs as the FeatureService service in the @creatio-devkit/common library. Learn more: Hide functionality on a page. This lets client-side apps adapt UI or behavior dynamically while maintaining Creatio security standards.
Use the AnonymousFeatureService.svc web service when client-side apps and integrations need to do the following:
- Check whether certain functionality is available before login.
- Determine whether to display Freedom UI components based on additional feature statuses.
- Reduce API calls that require authentication.
For example, a custom login page can call the AnonymousFeatureService.svc web service to determine if custom core localizations are active and display localizable strings immediately, before the user logs in.
Since version 8.3.1, the whitelist includes the following additional features:
CommonFeatures.UseCustomCoreLocalizations. Whether to use additional language culture for core resources. Out of the box, registered and disabled.UseRoleBasedLicenseDistribution. Whether to use role-based license distribution. Out of the box, registered and enabled.
The whitelist of additional features available before login is strictly defined and managed by Creatio. It cannot be extended by users.
To retrieve statuses of allowed additional features before login:
-
Create a request.
-
Add a request string. To do this, access the
ServiceModel/AnonymousFeatureService.svc/GetFeatureStatesendpoint.- Request string (.NET Framework)
- Request string (.NET)
POST CreatioURL/0/ServiceModel/AnonymousFeatureService.svc/GetFeatureStatesPOST CreatioURL/ServiceModel/AnonymousFeatureService.svc/GetFeatureStates -
Add a request header.
Header
Description
Content-Type
The media type of the resource. Set to "application/json." Learn more: Content-Type Header Field (official RFC Editor documentation).
No parameters are required in the request body.
-
-
Execute the request.
As a result, the AnonymousFeatureService.svc web service will return a JSON object that includes a "key-value" collection where "key" is the code of the allowed additional feature (the "Code" column value of the feature on the Feature toggling page) and the "value" is the status of the additional feature for all users or user groups (the "Is enabled" column value of the feature on the Feature toggling page).
Status: 200 OK
{
"GetFeatureStatesResult": [
{
"Key": "CommonFeatures.UseCustomCoreLocalizations",
"Value": 0
},
{
"Key": "UseRoleBasedLicenseDistribution",
"Value": 1
}
]
}
View the example that retrieves statuses of allowed additional features before login in curl below.
- Request (cURL)
- Response (cURL)
curl -X POST "http://CreatioURL/0/ServiceModel/AnonymousFeatureService.svc/GetFeatureStates" -H "Content-Type: application/json" -d "{}"
{"GetFeatureStatesResult":[{"Key":"CommonFeatures.UseCustomCoreLocalizations","Value":0},{"Key":"UseRoleBasedLicenseDistribution","Value":1}]}
See also
Manage an existing additional feature
Resources
Content-Type Header Field (official RFC Editor documentation)
Feature toggle (Wikipedia)