skipcheck

TM1 client · Docs · The server

ServerService

from skipcheck_tm1.services import ServerService

The server: what it is (Server), how it's configured, and its loggers.

The static configuration is tm1s.cfg's, and the one to change; the active one is what the server runs with now, read only.

Read the server's name and version:

server = tm1.server.server(ODataQuery.none().select(Server.NAME, Server.PRODUCT_VERSION))
return f"{server.name} runs TM1 {server.product_version}"

Read a setting the server runs with now:

# What the server runs with now, which can differ from tm1s.cfg until it restarts
administration = tm1.server.active_configuration().administration
return None if administration is None else administration.data_base_directory

Change a logger's level:

# Takes effect at once, without a restart
tm1.server.set_logger_level("TM1.Process", LogLevel.DEBUG)

The asyncio flavor, skipcheck_tm1.aio, has the same methods to await, on AsyncServerService.

Members

serverThe server's name, version and ports.
static_configurationThe settings the server started with, from tm1s.cfg.
update_static_configurationChanges tm1s.cfg; most settings take effect when the server next starts.
active_configurationThe settings the server runs with now.
configurationThe server's configuration in the older, flat form...
loggersThe server's loggers and their levels.
loggerGET Loggers('name'), such as TM1.Server; a Tm1NotFoundError if there's none.
set_logger_levelChanges a logger's level, at once.

server

server(query: ODataQuery | None = None, **options: Any) -> Server

GET Server: the server's name, version and ports. TM1 (11.8) sends no ETag for it.

TM1 REST Singleton Server

static_configuration

static_configuration(query: ODataQuery | None = None, **options: Any) -> ServerSettings

GET StaticConfiguration: the settings the server started with, from tm1s.cfg.

TM1 REST Singleton StaticConfiguration

update_static_configuration

update_static_configuration(patch: Any) -> None

PATCH StaticConfiguration: changes tm1s.cfg; most settings take effect when the server next starts. patch is a ServerSettingsPatch, a model or a mapping.

TM1 REST Singleton StaticConfiguration

active_configuration

active_configuration(query: ODataQuery | None = None, **options: Any) -> ServerSettings

GET ActiveConfiguration: the settings the server runs with now. Read only: TM1 (11.8) refuses a PATCH here ("PATCH not allowed on this resource"); settings change through update_static_configuration.

TM1 REST Singleton ActiveConfiguration

configuration

configuration(query: ODataQuery | None = None, **options: Any) -> Configuration

GET Configuration: the server's configuration in the older, flat form.

.. deprecated:: 11.0.0 Deprecated in TM1 schema 11.0.0: use static_configuration and active_configuration.

TM1 REST Singleton Configuration

loggers

loggers(query: ODataQuery | None = None, **options: Any) -> list[Logger]

GET Loggers: the server's loggers and their levels.

TM1 REST EntitySet Loggers

logger

logger(name: str, query: ODataQuery | None = None, **options: Any) -> Logger

GET Loggers('name'), such as TM1.Server; a Tm1NotFoundError if there's none.

TM1 REST EntitySet Loggers

set_logger_level

set_logger_level(name: str, level: LogLevel) -> None

PATCH Loggers('name'): changes a logger's level, at once.

TM1 REST EntitySet Loggers