Giter VIP home page Giter VIP logo

sisense-api-client-csharp's Introduction

sisense-api-client-csharp

The unofficial .NET/C# client library for the Sisense API.

I develop this library in my spare time, so if you need an operation that is not implemented yet, please let me know and I will add it as soon as possible.

I'm testing this library with a Sisense Server 7.1.

In the future I will create a nuget package to easily include in the projects.

How to Use

using SisenseApiClient;
using SisenseApiClient.Authenticators;

// Create an authenticator with your username and password
var authenticator = new Authenticator("<username>", "<password>");

// Create the Sisense client
var sisenseClient = new SisenseClient("<sisense_server>", authenticator);

// Use one of the services 
var sets = await sisenseClient.ElatiCubes.GetSetsAsync();

How to use with Global Token Authentication

For Sisense version 5.8 and earlier, you can use the Global Token located in the Admin page of the Sisense Web Application. If you use a Sisense version later than the 5.8, I suggest you to use the authentication from the previous section to avoid receive 401 Unauthorized responses in some endpoints.

For more information check https://developer.sisense.com/display/API2/Authenticating+Requests+with+a+Global+Token

using SisenseApiClient;
using SisenseApiClient.Authenticators;

// Create an authenticator with your username, password and api key
var authenticator = new GlobalTokenAuthenticator("<username>", "<password>", "<apikey>");

// Create the Sisense client
var sisenseClient = new SisenseClient("<sisense_server>", authenticator);

// Use one of the services 
var sets = await sisenseClient.ElatiCubes.GetSetsAsync();

What services are provided?

Application
  • GetStatusAsync() - Provides information on the current status of the Sisense application
Authentication
  • LoginAsync(credentials) - Authenticate and receive a token
ElastiCubes
  • v1.0

    • GetSetsAsync() - Get a list of ElastiCube Sets
    • GetSetAsync(setName) - Get an ElastiCube Set
    • GetBuildRevisionAsync(server, cubeName) - Get the ElastiCube build revision
    • GetCustomTablesAsync(server, cubeName) - Get an ElastiCube's custom tables
    • GetCustomTableRelationsAsync(server, cubeName, tableName) - Get an ElastiCube table's relation
    • GetCustomTableAsync(server, cubeName, tableName) - Get an ElastiCube's custom table
    • VerifyConnectivityWithRServerAsync(server, rserver) - Verify connectivity between your ElastiCube server and an R server
    • GetServerSettingsAsync(server) - Returns your ElastiCube server’s settings
  • v0.9

    • GetElastiCubesMetadataAsync(query, sortBy) - Returns a list of ElastiCubes with metadata
    • GetElastiCubeMetadataAsync(cubeName) - Returns metadata for an ElastiCube by ElastiCube name
    • GetElastiCubeMetadataFieldsAsync(cubeName, query, offset, count) - Returns fields included in a specific ElastiCube
    • GetServersElastiCubesAsync(query, offset, count, direction, withPermissions) - Returns ElastiCubes with their server and ElastiCube details
    • GetServersMetadataAsync(query, offset, count, direction, withPermissions) - Returns the ElastiCube servers with metadata.
    • GetElastiCubesByServerAsync(server, query, offset, count, orderBy, direction) - Returns all the ElastiCubes by server.
    • GetServerStatusAsync(server, query, offset, count, orderBy, direction) - Returns the status of each ElastiCube in the selected server.
    • GetElastiCubePermissionsAsync(server, cubeName) - Returns all authentication records for the given ElastiCube.
    • StartElastiCubeServerAsync(server, cubeName) - Starts the ElastiCube Server.
    • StopElastiCubeServerAsync(server, cubeName) - Stops the ElastiCube Server.
    • RestartElastiCubeServerAsync(server, cubeName) - Restarts the ElastiCube Server.
    • StartBuildElastiCubeServerAsync(server, cubeName, buildType) - Starts the build process for an ElastiCube.
    • StopBuildElastiCubeServerAsync(server, cubeName) - Stops the build process for an ElastiCube.
JAQL
  • RunAsync(jaqlQuery, cancellationToken) - Runs a JAQL Query and returns the result as a JSON string.
  • RunAsync(jaqlQuery) - Runs a JAQL Query and returns the result as a JSON string.
  • RunAsync(jaqlQuery, cancellationToken) - Runs a JAQL Query and returns the result as an object of the specified type.
  • RunAsync(jaqlQuery) - Runs a JAQL Query and returns the result as an object of the specified type.
SQL
  • RunAsync(cubeName, sqlQuery, cancellationToken) - Runs a SQL Query and returns the result as a JSON string.
  • RunAsync(cubeName, sqlQuery) - Runs a SQL Query and returns the result as a JSON string.
  • RunAsync(cubeName, sqlQuery, cancellationToken) - Runs a SQL Query and returns the result as an object of the specified type.
  • RunAsync(cubeName, sqlQuery) - Runs a SQL Query and returns the result as an object of the specified type.

Bugs or questions?

Please open an issue for any bugs or questions

sisense-api-client-csharp's People

Contributors

scott-baxter avatar

Stargazers

Gregory Ross avatar dev avatar

Watchers

James Cloos avatar

Forkers

theburningmap

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.