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 static | A builder for a client of one TM1 server. |
Of static | A client over session, which it shares. |
Session property | The session, which sends any request (Tm1Request). |
Dimensions property | Dimensions, on this client's session. |
Hierarchies property | Hierarchies, on this client's session. |
Elements property | Elements, on this client's session. |
Edges property | Edges, on this client's session. |
Levels property | Levels, on this client's session. |
Members property | Members, on this client's session. |
Subsets property | Subsets, on this client's session. |
Attributes property | Attribute definitions, on this client's session. |
LocalizedAttributes property | Translated attribute values, on this client's session. |
Cubes property | Cubes, on this client's session. |
Views property | Views, on this client's session. |
Cellsets property | Cellsets, on this client's session. |
Cells property | Cell writes, on this client's session. |
MemberSets property | Member sets, on this client's session. |
Sandboxes property | Sandboxes, on this client's session. |
ChangeSets property | Change sets, on this client's session. |
Drillthrough property | Drillthrough, on this client's session. |
Processes property | Processes, on this client's session. |
ProcessDebugging property | Process debugging, on this client's session. |
Chores property | Chores, on this client's session. |
Users property | Users, on this client's session. |
Groups property | Groups, on this client's session. |
Sessions property | Server sessions, on this client's session. |
Threads property | Server threads, on this client's session. |
Server property | The server, on this client's session. |
Logs property | The server's logs, on this client's session. |
Contents property | The contents tree, on this client's session. |
Annotations property | Annotations on cube cells, on this client's session. |
Git property | TM1 Git, on this client's session. |
Encryption property | Encryption at rest, on this client's session. |
OidcKeys property | The cached OpenID Connect keys, on this client's session. |
SqlDataSources property | The ODBC data sources on TM1's host, on this client's session. |
Batch | A JSON $batch. |
WithAsync | A client whose requests TM1 runs asynchronously, polled every every. |
WithoutAsync | A client on a synchronous view of this client's session (Tm1Session.WithoutAsync). |
WithSandbox | A client whose requests run in sandbox name. |
WithChangeSet | A client whose writes are recorded in change set id. |
ConnectAsync | Logs in now, rather than on the first request. |
CloseAsync | Ends the session on the server. |
DisposeAsync | Closes the session. |
ToString |
Builder
staticTm1ClientBuilder Builder()A builder for a client of one TM1 server.
Of
staticTm1Client Of(Tm1Session session)A client over session, which it shares.
Session
propertyTm1Session SessionThe session, which sends any request (Tm1Request).
Dimensions
propertyDimensionService DimensionsDimensions, on this client's session.
Hierarchies
propertyHierarchyService HierarchiesHierarchies, on this client's session.
Elements
propertyElementService ElementsElements, on this client's session.
Edges
propertyEdgeService EdgesEdges, on this client's session.
Levels
propertyLevelService LevelsLevels, on this client's session.
Members
propertyMemberService MembersMembers, on this client's session.
Subsets
propertySubsetService SubsetsSubsets, on this client's session.
Attributes
propertyAttributeService AttributesAttribute definitions, on this client's session.
LocalizedAttributes
propertyLocalizedAttributeService LocalizedAttributesTranslated attribute values, on this client's session.
Cubes
propertyCubeService CubesCubes, on this client's session.
Views
propertyViewService ViewsViews, on this client's session.
Cellsets
propertyCellsetService CellsetsCellsets, on this client's session.
Cells
propertyCellService CellsCell writes, on this client's session.
MemberSets
propertyMemberSetService MemberSetsMember sets, on this client's session.
Sandboxes
propertySandboxService SandboxesSandboxes, on this client's session.
ChangeSets
propertyChangeSetService ChangeSetsChange sets, on this client's session.
Drillthrough
propertyDrillthroughService DrillthroughDrillthrough, on this client's session.
Processes
propertyProcessService ProcessesProcesses, on this client's session.
ProcessDebugging
propertyProcessDebugService ProcessDebuggingProcess debugging, on this client's session.
Chores
propertyChoreService ChoresChores, on this client's session.
Users
propertyUserService UsersUsers, on this client's session.
Groups
propertyGroupService GroupsGroups, on this client's session.
Sessions
propertySessionService SessionsServer sessions, on this client's session.
Threads
propertyThreadService ThreadsServer threads, on this client's session.
Server
propertyServerService ServerThe server, on this client's session.
Logs
propertyLogService LogsThe server's logs, on this client's session.
Contents
propertyContentService ContentsThe contents tree, on this client's session.
Annotations
propertyAnnotationService AnnotationsAnnotations on cube cells, on this client's session.
Git
propertyGitService GitTM1 Git, on this client's session.
Encryption
propertyEncryptionService EncryptionEncryption at rest, on this client's session.
OidcKeys
propertyOidcKeyService OidcKeysThe cached OpenID Connect keys, on this client's session.
SqlDataSources
propertySqlDataSourceService SqlDataSourcesThe 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()