skipcheck

TM1 client · Docs · The client

Tm1Client

using Skipcheck.Tm1.Client;

Used in the walkthroughs Connect and list your cubes, Test your code against a real TM1, Add TM1 to a Spring Boot application.

The client for one TM1 server: one Tm1Session, and every service built on it, such as Dimensions. Services arrive with the endpoint phases; Session sends any request, for what has no service yet.

// Disposing the client closes its session on TM1
await using var tm1 = Tm1Client.Builder().BaseUrl("http://localhost:8010/api/v1/").BasicAuth("admin", "apple").Build();

await foreach (var cube in tm1.Cubes.ModelCubesAsync(ODataQuery.None().Select(Cube.Fields.Name)))
{
    Console.WriteLine(cube.Name);
}

Run a long process asynchronously, so no request stays open for its whole run:

// TM1 runs it in the background and the client polls for the result, so no
// request stays open. Cancelling the call stops the process on TM1.
return await tm1.WithAsync(TimeSpan.FromSeconds(2)).Processes.ExecuteWithReturnAsync("Rebuild Forecast");

Members

Builder staticA builder for a client of one TM1 server.
Of staticA client over session, which it shares.
Session propertyThe session, which sends any request (Tm1Request).
Dimensions propertyDimensions, on this client's session.
Hierarchies propertyHierarchies, on this client's session.
Elements propertyElements, on this client's session.
Edges propertyEdges, on this client's session.
Levels propertyLevels, on this client's session.
Members propertyMembers, on this client's session.
Subsets propertySubsets, on this client's session.
Attributes propertyAttribute definitions, on this client's session.
LocalizedAttributes propertyTranslated attribute values, on this client's session.
Cubes propertyCubes, on this client's session.
Views propertyViews, on this client's session.
Cellsets propertyCellsets, on this client's session.
Cells propertyCell writes, on this client's session.
MemberSets propertyMember sets, on this client's session.
Sandboxes propertySandboxes, on this client's session.
ChangeSets propertyChange sets, on this client's session.
Drillthrough propertyDrillthrough, on this client's session.
Processes propertyProcesses, on this client's session.
ProcessDebugging propertyProcess debugging, on this client's session.
Chores propertyChores, on this client's session.
Users propertyUsers, on this client's session.
Groups propertyGroups, on this client's session.
Sessions propertyServer sessions, on this client's session.
Threads propertyServer threads, on this client's session.
Server propertyThe server, on this client's session.
Logs propertyThe server's logs, on this client's session.
Contents propertyThe contents tree, on this client's session.
Annotations propertyAnnotations on cube cells, on this client's session.
Git propertyTM1 Git, on this client's session.
Encryption propertyEncryption at rest, on this client's session.
OidcKeys propertyThe cached OpenID Connect keys, on this client's session.
SqlDataSources propertyThe ODBC data sources on TM1's host, on this client's session.
BatchA JSON $batch.
WithAsyncA client whose requests TM1 runs asynchronously, polled every every.
WithoutAsyncA client on a synchronous view of this client's session (Tm1Session.WithoutAsync).
WithSandboxA client whose requests run in sandbox name.
WithChangeSetA client whose writes are recorded in change set id.
ConnectAsyncLogs in now, rather than on the first request.
CloseAsyncEnds the session on the server.
DisposeAsyncCloses the session.
ToString

Builder

static
Tm1ClientBuilder Builder()

A builder for a client of one TM1 server.

Of

static
Tm1Client Of(Tm1Session session)

A client over session, which it shares.

Session

property
Tm1Session Session

The session, which sends any request (Tm1Request).

Dimensions

property
DimensionService Dimensions

Dimensions, on this client's session.

Hierarchies

property
HierarchyService Hierarchies

Hierarchies, on this client's session.

Elements

property
ElementService Elements

Elements, on this client's session.

Edges

property
EdgeService Edges

Edges, on this client's session.

Levels

property
LevelService Levels

Levels, on this client's session.

Members

property
MemberService Members

Members, on this client's session.

Subsets

property
SubsetService Subsets

Subsets, on this client's session.

Attributes

property
AttributeService Attributes

Attribute definitions, on this client's session.

LocalizedAttributes

property
LocalizedAttributeService LocalizedAttributes

Translated attribute values, on this client's session.

Cubes

property
CubeService Cubes

Cubes, on this client's session.

Views

property
ViewService Views

Views, on this client's session.

Cellsets

property
CellsetService Cellsets

Cellsets, on this client's session.

Cells

property
CellService Cells

Cell writes, on this client's session.

MemberSets

property
MemberSetService MemberSets

Member sets, on this client's session.

Sandboxes

property
SandboxService Sandboxes

Sandboxes, on this client's session.

ChangeSets

property
ChangeSetService ChangeSets

Change sets, on this client's session.

Drillthrough

property
DrillthroughService Drillthrough

Drillthrough, on this client's session.

Processes

property
ProcessService Processes

Processes, on this client's session.

ProcessDebugging

property
ProcessDebugService ProcessDebugging

Process debugging, on this client's session.

Chores

property
ChoreService Chores

Chores, on this client's session.

Users

property
UserService Users

Users, on this client's session.

Groups

property
GroupService Groups

Groups, on this client's session.

Sessions

property
SessionService Sessions

Server sessions, on this client's session.

Threads

property
ThreadService Threads

Server threads, on this client's session.

Server

property
ServerService Server

The server, on this client's session.

Logs

property
LogService Logs

The server's logs, on this client's session.

Contents

property
ContentService Contents

The contents tree, on this client's session.

Annotations

property
AnnotationService Annotations

Annotations on cube cells, on this client's session.

Git

property
GitService Git

TM1 Git, on this client's session.

Encryption

property
EncryptionService Encryption

Encryption at rest, on this client's session.

OidcKeys

property
OidcKeyService OidcKeys

The cached OpenID Connect keys, on this client's session.

SqlDataSources

property
SqlDataSourceService SqlDataSources

The ODBC data sources on TM1's host, on this client's session.

Batch

Tm1Batch Batch()

A JSON $batch: calls through Tm1Batch.Client are queued, and RunAsync sends them together.

WithAsync

Tm1Client WithAsync(TimeSpan every)

A client whose requests TM1 runs asynchronously, polled every every.

WithoutAsync

Tm1Client WithoutAsync()

A client on a synchronous view of this client's session (Tm1Session.WithoutAsync).

WithSandbox

Tm1Client WithSandbox(string name)

A client whose requests run in sandbox name.

WithChangeSet

Tm1Client WithChangeSet(string id)

A client whose writes are recorded in change set id.

ConnectAsync

Task<Tm1Client> ConnectAsync(CancellationToken cancellationToken = default)

Logs in now, rather than on the first request.

CloseAsync

Task CloseAsync()

Ends the session on the server.

DisposeAsync

ValueTask DisposeAsync()

Closes the session: CloseAsync.

ToString

string ToString()