Pilot Features API Code Samples
Selection of code samples that demonstrate the use of the Pilot Features API. Copy and edit these code samples to suit your needs.
When using the code samples, remember to replace:
- {vanity_name} with your tenant name
- {api_key} with your API key
- {security_token} with a valid security token
These code samples may not include all available parameters and request body fields for each endpoint. For the endpoint's full request schema, see "Pilot Features" in API Reference.
Retrieve pilot features
Use this sample request to retrieve a list of available pilot features for your tenant, along with their configurations.
Note: For administrating tenants, this sample retrieves pilot features available for the administrating tenant.
If you don't specify a tenant, the default is the administrating tenant. If you specify the TargetTenantID in the request header, the request applies to the target tenant.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1alpha/admin/pilot-features/features' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns the available pilot features for your tenant and their configurations.
{
"features": [
{
"featureKey": "visier.preview.studioGlobalWorkspaceNav",
"displayName": "Studio Global Workspace Navigation",
"description": "Try the redesigned Studio navigation: rooms in the left navbar, a version selector, and sidebar views.",
"type": "BETA",
"userConfig": {
"featureKey": "visier.preview.studioGlobalWorkspaceNav",
"userLevelEnabled": true
},
"tenantConfig": {
"featureKey": "visier.preview.studioGlobalWorkspaceNav",
"tenantLevelEnabled": true
}
},
...
]
}
Retrieve tenant-level pilot feature configurations
Use this sample request to retrieve the configurations of each pilot feature available to your tenant.
Note: For administrating tenants, this sample retrieves configurations for pilot features available for the administrating tenant.
If you don't specify a tenant, the default is the administrating tenant. If you specify the TargetTenantID in the request header, the request applies to the target tenant.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1alpha/admin/pilot-features/tenant-config' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns the configurations of each pilot feature available to your tenant.
{
"pilotFeatureConfigs": [
{
"featureKey": "visier.preview.studioGlobalWorkspaceNav",
"tenantLevelEnabled": true
}
]
}
For administrating tenants, the response also indicates whether the pilot feature is available to analytic tenants. In this example, analyticTenantAccess is AVAILABLE_DEFAULT_OFF, which means the pilot feature is available at the analytic tenant level, but disabled by default.
{
"pilotFeatureConfigs": [
{
"featureKey": "visier.preview.studioGlobalWorkspaceNav",
"tenantLevelEnabled": true
"analyticTenantAccess": "AVAILABLE_DEFAULT_OFF"
}
]
}
The following sample request specifies the analytic tenant WFF_j1r~c7o in the request header to retrieve the configurations of each pilot feature available to the analytic tenant.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1alpha/admin/pilot-features/tenant-config' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'TargetTenantID: WFF_j1r~c7o'
For analytic tenants, tenantLevelEnabled reflects the tenant's own setting when tenantLevelOverridden is true. Otherwise, it reflects the default set by the administrating tenant.
In this example, tenantLevelOverriden is false, so the analytic tenant inherits the administrating tenant's setting, which is currently off.
{
"pilotFeatureConfigs": [
{
"featureKey": "visier.preview.studioGlobalWorkspaceNav",
"tenantLevelEnabled": false,
"tenantLevelOverridden": false
}
]
}
Partially update tenant-level pilot feature configurations
Use this sample request to partially update configurations to enable or disable pilot features across your tenant.
Note: For administrating tenants, this sample updates the pilot feature configurations at the administrating tenant level. When enabling tenant-wide access at the administrating level, you must also specify whether the feature is available to analytic tenants and define its default state using the analyticTenantAccess parameter.
If you don't specify a tenant, the default is the administrating tenant. If you specify the TargetTenantID in the request header, the request applies to the target tenant.
curl -X PATCH --url 'https://{vanity_name}.api.visier.io/v1alpha/admin/pilot-features/tenant-config' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
-d '{
"pilotFeatureConfigs": [
{
"featureKey": "visier.preview.studioGlobalWorkspaceNav",
"tenantLevelEnabled": true,
"analyticTenantAccess": "AVAILABLE_DEFAULT_OFF"
}
]
}'
Administrating tenants can override the default state of a pilot feature for individual analytic tenants.
The following sample specifies the analytic tenant WFF_j1r~c7o in the request header to partially update the pilot feature configurations in the analytic tenant. This configuration overrides the administrating tenant's default state (off) to enable the pilot feature for the analytic tenant.
curl -X PATCH --url 'https://{vanity_name}.api.visier.io/v1alpha/admin/pilot-features/tenant-config' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'TargetTenantID: WFF_j1r~c7o' \
-H 'Content-Type: application/json' \
-d '{
"pilotFeatureConfigs": [
{
"featureKey": "visier.preview.studioGlobalWorkspaceNav",
"tenantLevelEnabled": true,
"tenantLevelOverridden": true
}
]
}'
The response returns whether the request was successful.
Retrieve user-level pilot feature configurations
Use this sample request to retrieve your user-level pilot feature configurations and determine whether you have access to the pilot feature in the tenant.
Note: User-level configurations are set at the administrating tenant level and apply across all analytic tenants.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1alpha/admin/pilot-features/user-preferences' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns the configurations of each pilot feature available to your tenant.
{
"pilotFeatureConfigs": [
{ "featureKey": "visier.preview.studioGlobalWorkspaceNav", "userLevelEnabled": true },
{ "featureKey": "visier.preview.usersImprovedView", "userLevelEnabled": false }
]
}
Partially update user-level pilot feature configurations
Use this sample request to partially update your user-level pilot feature configurations to enable or disable your access to the pilot feature in the tenant.
Note: For administrating tenants, this updates your access to features at the administrating tenant level and applies across your analytic tenants.
curl -X PATCH --url 'https://{vanity_name}.api.visier.io/v1alpha/admin/pilot-features/user-preferences' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
-d '{
"pilotFeatureConfigs": [
{
"featureKey": "visier.preview.usersImprovedView",
"userLevelEnabled": true
}
]
}'
The response returns whether the request was successful.
