Skip to content

Deepser API Guide: Integrate Deepser's help desk software effortlessly. Use Deepser.dll for installation, add references, and follow simple steps. Manage entities like Operation (Ticket), User, and Company with ease. Perform actions like loading, creating, updating, and deleting effortlessly. Elevate your project with this concise API guide. 🛠️✨

Notifications You must be signed in to change notification settings

MatteoTrombin/api-csharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 

Repository files navigation

Deepser API

This is a guide for consuming the Deepser API - a help desk software. More information can be found in the Deepser API Docs.

Installation

This is a quick guide to using the Deepser library within your project, follow these steps:

  1. Download the Deepser.dll file from the repository.

  2. In Visual Studio, right-click on the "References" menu in the Solution Explorer and select "Add Reference".

  3. In the dialog box, locate the downloaded Deepser.dll file and add it as a reference.

  4. Add the Deepser namespace to your code using the "using" directive.

  5. Install the Newtonsoft.Json NuGet package in your project. To do this, go to the "Manage NuGet Packages" menu, search for "Newtonsoft.Json," and install the package.

  6. Make sure the package has been added to your project's references along with Deepser.dll.

Once these steps are complete, you will be able to access the methods and classes defined in Deepser.dll in your code.

Example

Login with Basic Authentication

string host = "https://your.deepser.net";
string username = "username";
string password = "password";
Authentication auth = new Authentication(host, username, password);

Login with Token Based Authentication

string host = "https://your.deepser.net";
string token = "mytokenhere";
Authentication auth = new Authentication(host, token);

Factory

Factory fact = new Factory();

//create new instances of the various entities using the factory pattern
var comp = fact.CreateEntity("Company");
var op = fact.CreateEntity("Operation");
var user = fact.CreateEntity("User");

Operation (Ticket)

// load an existing operation by id
var result = await op.Load(5413);

// get the data from the operation I loaded
result.getData("description");

// create new operation object
op.setData("type_id", 1)
  .setData("title", "iPhone 13")
  .setData("category1", 17)
  .setData("description", "Description")
  .setData("priority_id", 1)
  .setData("urgency_id", 1)
  .setData("status", 1);
var result = await op.Create();

// get the data from the operation I created
op.getData("entity_id");

// update an operation
op.setData("title", "NewTitle");
op.Update("OldTitle", "title");

// get the data from the operation I updated
op.getData("title");

// delete by id 
await op.Delete(5396);

// delete by attribute
await op.Delete("NewTicket", "title");

User

// load an existing user by id
var result = await user.Load(48);

// get the data from the user I loaded
result.getData("username"); 

// load user collection

// set up collection for the user entity
Collection collection = new Collection();
collection.SetMainModel(typeof(User));

// add filter
var filter = collection.GetFilter();
filter.addFilter("username", EqualTo, "admin");

// load collection
await collection.LoadMultiple();
var items = collection.GetCollection();
foreach (var item in items)
{
    $"{item.Key} : {item.Value}";
}

Company

// load an existing operation by id
await comp.Load(2);

// load company collection

// set up collection for the company entity
Collection collection = new Collection();
collection.SetMainModel(typeof(Company));

// add filter
var filter = collection.GetFilter();
filter.addFilter("name", Like, "ACME%");

// add parameter
var parameter = collection.GetParameter();
parameter.SetOrder("entity_id", Parameter.Ascending);

// load collection
await collection.LoadMultiple();
var items = collection.GetCollection();
foreach (var item in items)
{
    $"{item.Key} : {item.Value}";
}

Credits

Support

Please open an issue in github

Conclusion

The Deepser API is a helpful tool for building and managing help desk software. By following the above examples, you can consume the Deepser API and build your own customized applications.

About

Deepser API Guide: Integrate Deepser's help desk software effortlessly. Use Deepser.dll for installation, add references, and follow simple steps. Manage entities like Operation (Ticket), User, and Company with ease. Perform actions like loading, creating, updating, and deleting effortlessly. Elevate your project with this concise API guide. 🛠️✨

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages