The available Stimulsoft Server workspaces can be listed through either the strongly-typed .NET Connect API or the raw REST API.

Via the .NET Connect API.
var connection = new StiServerConnection(ServerAddress);
connection.Accounts.Users.Login(Username, Password);

if (connection.Accounts.Roles.Current.IsSupervisor)
{
    var names = connection.Accounts.Workspaces.FetchAll().Select(w => w.Name);
}

connection.Accounts.Users.Logout();
Via the REST API.
var login = WebRequest.Create($"{RestUrl}/login");
login.Headers.Add("x-sti-UserName", Username);
login.Headers.Add("x-sti-Password", Password);
var sessionKey = GetResponseJson(login).Value<string>("ResultSessionKey");

var req = WebRequest.Create($"{RestUrl}/workspaces");
req.Headers.Add("x-sti-SessionKey", sessionKey);
var names = GetResponseJson(req).Value<JArray>("ResultWorkspaces").Select(w => w["Name"]);

How it works. Both APIs authenticate as a supervisor and enumerate workspaces, so you can integrate with the Server from .NET or any HTTP client.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.