Skip to content

lsimediasarl/JZammad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JZammad

Java connector to parse Zammad ticket via the json api

Usage

Here is an example how to use the connector

String token = "";

ZammadConnectionManager zammad = new ZammadConnectionManager("https", "tickets.xxx.xxx", token, "/api/v1");
zammad.dumpResponse(true);
zammad.start();

ZammadRequest req = new ZammadRequest("none", "tickets", "");
req.setSortBy("number", "desc");
req.setLimit(1, 100);
// ZammadRequest req = new ZammadRequest("none", "ticket_articles/by_ticket/16", "");
ZammadResponse response = zammad.sendb(req);
// System.out.println("RESPONSE:" + response);
ArrayList<Object> entries = response.getEntries();
for (int i = 0;i < entries.size();i++) {
	Object obj = entries.get(i);
	if (obj instanceof ZammadEntry) {
		ZammadEntry entry = (ZammadEntry) obj;
		System.out.println("TICKET:" + entry.getField("number"));
		// System.out.println(entry);
		//System.out.println("===");
	}
}
zammad.interrupt();`

About

Java connector for Zammad support solution

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages