Repository Client

Communication with the repository is achieved through the RepositoryClient found in the namespace Com.KapowTech.RoboSuite.Api.Repository.Engine

Let's look at an example

string UserName = "admin";
string Password = "admin1234";
RepositoryClient client = new RepositoryClient("http://localhost:50080/", UserName, Password);
Project[] projects = client.GetProjects();
    foreach(Project p in projects) {
Console.WriteLine(p);
}

Get Projects from Repository


Here we see a RepositoryClient configured to connect to Management Console's repository on http://localhost:50080/ with a username and password. If the Management Console is not password protected, you must supply null for user name and password.

Once the RepositoryClient is created, we use the GetProjects() method to query the repository for a list of projects. Notice that when calling any of the RepositoryClient methods, a RepositoryClientException will be thrown if an error occurs.

The RepositoryClient has the following eleven methods

Method signature

description

void DeleteResource(string projectName, string resourceName, boolean silent)

Deletes a resource from a project.

void DeleteRobot(string projectName, string robotName, boolean silent)

Deletes a robot from a project

void DeleteType(string projectName, string typeName, boolean silent)

Deletes a type from a project

void DeleteSnippet(string projectName, string SnippetName, boolean silent)

Deletes a snippet from a project

void DeployLibrary(string projectName, EmbeddedFileBasedRobotLibrary library, boolean failIfExists)

Deploys a library to the server. Robots, types and resources will be overridden unless failIfExists is true.

void DeployResource(string projectName, string resourceName, byte[] resourceBytes, boolean failIfExists)

Deploys a resource to a project. If a resource with the given name already exist it can be overridden by setting failIfExists to false.

void DeployRobot(string projectName, string robotName, byte[] robotBytes, boolean failIfExists)

Deploys a robot to a project. If a robot with the given name already exist it can be overridden by setting failIfExists to false.

void DeployType(string projectName, string typeName, byte[] typeBytes, boolean failIfExists)

Deploys a type to a project. If a type with the given name already exist it can be overridden by setting failIfExists to false.

void DeploySnippet(string projectName, string snippetName, byte[] snippetBytes, boolean failIfExists)

Deploys a snippet to a project. If a snippet with the given name already exist it can be overridden by setting failIfExists to false.

Project[] GetProjects()

Returns the projects that exist in this repository

Cluster[] GetRoboServerClusters()

Return the cluster configuration on the Management Console

Robot[] GetRobotsInProject(string projectName)

Returns the robots available in the project with the given name.

RobotSignature GetRobotSignature(string projectName, string robotName)

Returns the robot signature, e.i. the input variables required to execute this robot and a list of the types it may return

Methods of the RepositoryClient


Check the .Net documentation for details. The .Net documentation is located inside you Kapow Katalyst installation at /API/robosuite-dotnet-api/docs/RoboSuite .NET API.chm.

If authentication is enabled on the repository, the request may be declined if the credentials given doesn't have sufficient access.

The repository is accessed via http. When using the .Net version of the Repository API, any proxy servers configured for Internet Explorer will be used by the Repository API.