Notification samples


Suggested code sample

First, you must create the webservice object:

OKMWebservices ws = OKMWebservicesFactory.newInstance(host);

Then should login using the method "login". You can access the "login" method from webservice object "ws" as is shown below:

ws.login(user, password);

Once you are logged with the webservices the session is keep in the webservice Object. Then you can use the other API method

At this point you can use all the Notification methods from "notification" class as is shown below:

ws.notification.notify(uuids, users, roles, mails, message, false);




MethodReturn valuesDescription

notify(List<String> uuids, List<String> users, List<String> roles, List<String> mails, String message, bool attachment)


Send a mail notification.

The parameter uuids are the UUID of the node ( document, folder, mail or record ).

The parameter users are a set of OpenKM users to be notified.

The parameter roles are a set of OpenKM roles to be notified.

The parameter mails are a set of email addresses - usually external mails - to be notified.

The parameter message is the content body of the mail.

When attachment value is true the node is attached into the mail.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.openkm.sdk4csharp;
using com.openkm.sdk4csharp.bean;

namespace OKMRest
    public class Program
        static void Main(string[] args)
            String host = "http://localhost:8180/openkm";
            String username = "okmAdmin";
            String password = "admin";
            OKMWebservice ws = OKMWebservicesFactory.newInstance(host);

                ws.login(user, password);
List<String> uuids = new List<string>();
List<String> users = new List<string>();
List<String> roles = new List<string>();
List<String> mails = new List<string>();
String message = "Any message"
ws.notification.notify(uuids, users, roles, mails, message, false); } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }