1. Scripting SDK

Settings client

The Settings client can be used to provide some extra utilities for retrieving settings.

Settings are entities that can be used with the Querying client and the Entities client. This client is useful because it provides common queries that would otherwise have to be written by hand.

Get the category ID

The following example snippet gets the ID of the PortalConfiguration category:

long? id = await MClient.Settings.GetCategoryIdAsync("PortalConfiguration");

Get a setting

The following example retrieves a setting called Authentication from the PortalConfiguration category:

IEntity setting = await MClient.Settings.GetSettingAsync("PortalConfiguration", "Authentication");
Note

You can pass an entity load configuration to the client.

Get all the settings for a category

You can also get all the settings for a category. For example, the following snippet gets all the rendition settings:

IList IEntity renditionSettings = await MClient.Settings.GetSettingsForCategoryAsync("Renditions");
Note

You can pass an entity load configuration.

If you have suggestions for improving this article, let us know!