Library allows to connect to KanBo and use its api in a friendly way. For more information go to https://help.kanboapp.com/en/devops/kanbo-api-for-developers/
License
—
Deps
4
Install Size
—
Vulns
✓ 0
Published
Jun 16, 2025
$ dotnet add package KanBo.ClientKanBo.Client - Main namespace containg all helpers for creating tokens and calling api
KanBo.Api - Namespace containg all api methods and data structures
.GetData - methods that return kanbo data
.Action - methods that make some actions in kanbo
.Data - kanbo data types used for varoius calls nad responses
string kanboCertificatePath = @"F:\Certs\SomeGeneratedCertificate.pfx";
string kanboCertificatePassword = @"$#testPassWord123#$";
or
string thumbprint = "06 ac 19 8c 89 c3 f7 cb bd 9d 49 f8 64 15 42 2a ea 15 da 5e".Replace(" ", "");
string kanboUrl = @"https://somekanbo.azurewebsites.net";
string kanboCertificateIssuer = "kanbo-client";
int kanboUserId = 1; // Id of a user that will be impersonated
string kanboUserLogin = "t.name@somesp.onmicrosoft.com"; // Login of a user that will be impersonated
string kanboLoginType = "upn-graph"; // Login type - used only in .AsLogin() operation
.AsService() - service token
.AsServiceWithEmail("name@test.onmicrosoft.com") - service token with email impersonation
.AsKanBoUserId(kanboUserId) - user token
.AsLogin(kanboUserLogin, kanboLoginType) - login token
.AsEmail("name@test.onmicrosoft.com") - email token
//AsLogin has build in wrappers showed below
.AsSpOnpremLogin("i:0#.w|domain/login")
.AsSpOnlineLogin("i:0#.f|membership|login@domain.onmicrosoft.com")
.AsSpOnlineUpn("name@test.onmicrosoft.com")
.AsO365UserId("2980b5dc-6c76-4867-9808-7fd00ae234c4")
.AsO365Upn("name@test.onmicrosoft.com")
//AsEmail has build in wrapper showed below
.AsServiceWithEmail("name@test.onmicrosoft.com")
.WithAuthRoles(string[] roles) - adding roles for token
var kanboCertificate = new X509Certificate2(kanboCertificatePath, kanboCertificatePassword);
var thumbprint = "06 ac 19 8c 89 c3 f7 cb bd 9d 49 f8 64 15 42 2a ea 15 da 5e".Replace(" ", "");
using var store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadOnly);
var certificates = store.Certificates.Find(X509FindType.FindByThumbprint, thumbprint, false);
var req = ApiBuilder.New.WithJsonApi(kanboUrl).WithIssuer(kanboCertificateIssuer)
.WithRsaSignature(kanboCertificate).AsService().Build();
Task.Run(async () =>
{
/* Get board with Id=1 */
var board = await req.GetData(new KanBo.Api.GetData.Board {Id = 1});
}).Wait();
//Each line of text is equal to new rich text block
var rtEd = new KanBo.Client.Helpers.RTEditor();
RichText rt = rtEd
.CreateTextBlock("Some Text").CreateBold(0,4) //line of text in which 'Some' is bold
.CreateCheckedItemBlock("Done item").CreateBold(0,4).GetRichText() //in new line add checked item with 'Done' bold
.CreateEmptyLine() //create an empty line
.CreateTextBlock("Some Text").CreateItalic(5,4) //new line with text in wich 'Text' is italic
.GetRichText();
var cm = new ConfigManager()
.SetIssuer("ui-path-actions-cert")
.AddCertFromFile(kanboConfigCertificatePath)
.AddServiceMapper("UiPathservice", new string[2] {"service","external-services"})
.AddUserMapper()
.AddEmailMapper(new string[1] {"external-services"})
.AddLoginMapper(new string[1] {"*"})
.GetJsonConfig();