Dashboard samples

Basic

Suggested code sample

First, you must create the web service object:

OKMWebservices ws = OKMWebservicesFactory.newInstance(host);

You should then log in using the "login" method. You can access the "login" method from the web service object "ws" as shown below:

ws.login(user, password);

Once you are logged in with the web services, the session is kept in the web service object. Then you can use the other API methods.

At this point you can use all the Dashboard methods from the "dashboard" class as shown below:

ws.dashboard.getUserCheckedOutDocuments();

Methods

getUserCheckedOutDocuments

Description:

Method Return values Description

getUserCheckedOutDocuments(int offset, int limit)

DashboardResultSet

Returns a list of the documents being edited by the user.

The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" specifies how many results to skip before returning results.

For example, if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

Example:

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);

            try
            {
                ws.login(user, password);
                DashboardResultSet resultSet = ws.dashboard.getUserCheckedOutDocuments(0, 5);
foreach (DashboardResult dashboardResult in resultSet.results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLastModifiedDocuments

Description:

Method Return values Description

getUserLastModifiedDocuments(int offset, int limit)

DashboardResultSet

Returns a list of the last documents modified by the user.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

Example:

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);

            try
            {
                ws.login(user, password);
                DashboardResultSet resultSet = ws.dashboard.getUserLastModifiedDocuments(0, 5);
foreach (DashboardResult dashboardResult in resultSet.results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLockedDocuments

Description:

Method Return values Description

getUserLockedDocuments(int offset, int limit)

DashboardResultSet

Returns a list of the documents locked by the user.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

Example:

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);

            try
            {
                ws.login(user, password);
                DashboardResultSet resultSet = ws.dashboard.getUserLockedDocuments(0, 5);
foreach (DashboardResult dashboardResult in resultSet.results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLockedRecords

Description:

Method Return values Description

getUserLockedRecords(int offset, int limit)

DashboardResultSet

Returns a list of the records locked by the user.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

Example:

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);

            try
            {
                ws.login(user, password);
                DashboardResultSet resultSet = ws.dashboard.getUserLockedRecords(0, 5);
foreach (DashboardResult dashboardResult in resultSet.results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLockedFolders

Description:

Method Return values Description

getUserLockedFolders(int offset, int limit)

DashboardResultSet

Returns a list of the folders locked by the user.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example, if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10 

Example:

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);

            try
            {
                ws.login(user, password);
                DashboardResultSet resultSet = ws.dashboard.getUserLockedFolders(0 ,5);
foreach (DashboardResult dashboardResult in resultSet.results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLockedMails

Description:

Method Return values Description

getUserLockedMails(int offset, int limit)

DashboardResultSet

Returns a list of the mails locked by the user.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

 Example:

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);

            try
            {
                ws.login(user, password);
                DashboardResultSet resultSet = ws.dashboard.getUserLockedMails(0 ,5);
foreach (DashboardResult dashboardResult in resultSet.results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserSubscribedDocuments

Description:

Method Return values Description

getUserSubscribedDocuments(int offset, int limit)

DashboardResultSet

Returns a list of the documents subscribed by the user.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

Example:

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);

            try
            {
                ws.login(user, password);
                DashboardResultSet resultSet = ws.dashboard.getUserSubscribedDocuments(0, 5);
foreach (DashboardResult dashboardResult in resultSet.results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserSubscribedFolders

Description:

Method Return values Description

getUserSubscribedFolders(int offset, int limit)

DashboardResultSet

Returns a list of the folders subscribed by the user.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

Example:

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);

            try
            {
                ws.login(user, password);
                DashboardResultSet resultSet = ws.dashboard.getUserSubscribedFolders(0, 5);
foreach (DashboardResult dashboardResult in resultSet.results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserSubscribedRecords

Description:

Method Return values Description

getUserSubscribedRecords(int offset, int limit)

DashboardResultSet

Returns a list of the records subscribed by the user.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10 

Example:

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);

            try
            {
                ws.login(user, password);
                DashboardResultSet resultSet = ws.dashboard.getUserSubscribedRecords(0, 5);
foreach (DashboardResult dashboardResult in resultSet.results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLastCreatedDocuments

Description:

Method Return values Description

getUserLastCreatedDocuments(int offset, int limit)

DashboardResultSet

Returns a list of the last documents created by the user.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example, if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

Example:

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);

            try
            {
                ws.login(user, password);
                DashboardResultSet resultSet = ws.dashboard.getUserLastCreatedDocuments(0, 5);
foreach (DashboardResult dashboardResult in resultSet.results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLastDocumentsNotesCreated

Description:

Method Return values Description

getUserLastDocumentsNotesCreated(int offset, int limit)

DashboardResultSet

Returns a list of the last documents notes created by the user.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example, if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

Example:

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);

            try
            {
                ws.login(user, password);
                DashboardResultSet resultSet = ws.dashboard.getUserLastDocumentsNotesCreated(0, 5);
foreach (DashboardResult dashboardResult in resultSet.results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLastCreatedFolders

Description:

Method Return values Description

getUserLastCreatedFolders(int offset, int limit)

DashboardResultSet

Returns a list of the last folders created by the user.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example, if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

Example:

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);

            try
            {
                ws.login(user, password);
                DashboardResultSet resultSet = ws.dashboard.getUserLastCreatedFolders(0, 5);
foreach (DashboardResult dashboardResult in resultSet.results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLastFoldersNotesCreated

Description:

Method Return values Description

getUserLastFoldersNotesCreated(int offset, int limit)

DashboardResultSet

Returns a list of the last folders notes created by the user.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example, if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

Example:

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);

            try
            {
                ws.login(user, password);
                DashboardResultSet resultSet = ws.dashboard.getUserLastFoldersNotesCreated(0, 5);
foreach (DashboardResult dashboardResult in resultSet.results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLastCreatedRecords

Description:

Method Return values Description

getUserLastCreatedRecords(int offset, int limit)

DashboardResultSet

Returns a list of the last records created by the user.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

Example:

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);

            try
            {
                ws.login(user, password);
                DashboardResultSet resultSet = ws.dashboard.getUserLastCreatedRecords(0, 5);
foreach (DashboardResult dashboardResult in resultSet.results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLastRecordsNotesCreated

Description:

Method Return values Description

getUserLastRecordsNotesCreated(int offset, int limit)

DashboardResultSet

Returns a list of the last records notes created by the user.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example, if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

Example:

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);

            try
            {
                ws.login(user, password);
                DashboardResultSet resultSet = ws.dashboard.getUserLastRecordsNotesCreated(0, 5);
foreach (DashboardResult dashboardResult in resultSet.results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLastDownloadedDocuments

Description:

Method Return values Description

getUserLastDownloadedDocuments(int offset, int limit)

DashboardResultSet

Returns a list of the last documents downloaded by the user.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

Example:

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);

            try
            {
                ws.login(user, password);
                DashboardResultSet resultSet = ws.dashboard.getUserLastDownloadedDocuments(0, 5);
foreach (DashboardResult dashboardResult in resultSet.results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLastImportedMails

Description:

Method Return values Description

getUserLastImportedMails(int offset, int limit)

DashboardResultSet

Returns a list of the last mails imported by the user.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

Example:

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);

            try
            {
                ws.login(user, password);
                DashboardResultSet resultSet = ws.dashboard.getUserLastImportedMails(0, 5);
foreach (DashboardResult dashboardResult in resultSet.results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLastMailsNotesCreated

Description:

Method Return values Description

getUserLastMailsNotesCreated(int offset, int limit)

DashboardResultSet

Returns a list of the last mails notes created by the user.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example, if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

Example:

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);

            try
            {
                ws.login(user, password);
                DashboardResultSet resultSet = ws.dashboard.getUserLastMailsNotesCreated(0, 5);
foreach (DashboardResult dashboardResult in resultSet.results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLastImportedMailAttachments

Description:

Method Return values Description

getUserLastImportedMailAttachments(int offset, int limit)

DashboardResultSet

Returns a list of the most recently imported emails with attachments by the user.

The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" tells the service to skip that many results before beginning to return results.

For example, if your query has 1000 results but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11 to 20; you should use these values:

  • limit=10
  • offset=10

Example:

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);

            try
            {
                ws.login(user, password);
                DashboardResultSet resultSet = ws.dashboard.getUserLastImportedMailAttachments(0, 5);
foreach (DashboardResult dashboardResult in resultSet.results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserSearches

Description:

Method Return values Description

getUserSearches()

List<QueryParams>

Returns a list of searches saved by the user as user news.

Example:

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);

            try
            {
                ws.login(user, password);
List<QueryParams> results = ws.dashboard.getUserSearches();
foreach (QueryParams userSearch in results)
{
System.Console.WriteLine(userSearch.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

findUserSearches

Description:

Method Return values Description

findUserSearches(long qpId)

List<DashboardNodeResult>

Returns a list of nodes based on a search saved by the user (search of type user news).

Example:

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);

            try
            {
                ws.login(user, password);                
List<DashboardNodeResult> results = ws.dashboard.findUserSearches();
foreach (DashboardNodeResult nodeResult in results)
{
System.Console.WriteLine(nodeResult.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }