Dashboard samples

Basic

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 Dashboard methods from "dasboard" class as is shown below:

ws.dashboard.getUserCheckedOutDocuments();

Methods

getUserCheckedOutDocuments

Description:

MethodReturn valuesDescription

getUserCheckedOutDocuments(int offset, int limit)

List<DashboardResult>

Returns a list of the documents in edition 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);
                List<DashboardResult> results = ws.dashboard.getUserCheckedOutDocuments();
foreach (DashboardResult dashboardResult in results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLastModifiedDocuments

Description:

MethodReturn valuesDescription

getUserLastModifiedDocuments(int offset, int limit)

List<DashboardResult>

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);
                List<DashboardResult> results = ws.dashboard.getUserLastModifiedDocuments();
foreach (DashboardResult dashboardResult in results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLockedDocuments

Description:

MethodReturn valuesDescription

getUserLockedDocuments(int offset, int limit)

List<DashboardResult>

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);
                List<DashboardResult> results = ws.dashboard.getUserLockedDocuments();
foreach (DashboardResult dashboardResult in results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLockedRecords

Description:

MethodReturn valuesDescription

getUserLockedRecords(int offset, int limit)

List<DashboardResult>

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);
                List<DashboardResult> results = ws.dashboard.getUserLockedRecords();
foreach (DashboardResult dashboardResult in results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLockedFolders

Description:

MethodReturn valuesDescription

getUserLockedFolders(int offset, int limit)

List<DashboardResult>

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);
                List<DashboardResult> results = ws.dashboard.getUserLockedFolders();
foreach (DashboardResult dashboardResult in results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLockedMails

Description:

MethodReturn valuesDescription

getUserLockedMails(int offset, int limit)

List<DashboardResult>

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);
                List<DashboardResult> results = ws.dashboard.getUserLockedMails();
foreach (DashboardResult dashboardResult in results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserSubscribedDocuments

Description:

MethodReturn valuesDescription

getUserSubscribedDocuments(int offset, int limit)

List<DashboardResult>

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);
                List<DashboardResult> results = ws.dashboard.getUserSubscribedDocuments();
foreach (DashboardResult dashboardResult in results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserSubscribedFolders

Description:

MethodReturn valuesDescription

getUserSubscribedFolders(int offset, int limit)

List<DashboardResult>

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);
                List<DashboardResult> results = ws.dashboard.getUserSubscribedFolders();
foreach (DashboardResult dashboardResult in results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserSubscribedRecords

Description:

MethodReturn valuesDescription

getUserSubscribedRecords(int offset, int limit)

List<DashboardResult>

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);
                List<DashboardResult> results = ws.dashboard.getUserSubscribedRecords();
foreach (DashboardResult dashboardResult in results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLastCreatedDocuments

Description:

MethodReturn valuesDescription

getUserLastCreatedDocuments(int offset, int limit)

List<DashboardResult>

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);
                List<DashboardResult> results = ws.dashboard.getUserLastCreatedDocuments();
foreach (DashboardResult dashboardResult in results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLastCreatedFolders

Description:

MethodReturn valuesDescription

getUserLastCreatedFolders(int offset, int limit)

List<DashboardResult>

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);
                List<DashboardResult> results = ws.dashboard.getUserLastCreatedFolders();
foreach (DashboardResult dashboardResult in results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLastCreatedRecords

Description:

MethodReturn valuesDescription

getUserLastCreatedRecords(int offset, int limit)

List<DashboardResult>

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);
                List<DashboardResult> results = ws.dashboard.getUserLastCreatedRecords();
foreach (DashboardResult dashboardResult in results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLastDownloadedDocuments

Description:

MethodReturn valuesDescription

getUserLastDownloadedDocuments(int offset, int limit)

List<DashboardResult>

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);
                List<DashboardResult> results = ws.dashboard.getUserLastDownloadedDocuments();
foreach (DashboardResult dashboardResult in results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLastImportedMails

Description:

MethodReturn valuesDescription

getUserLastImportedMails(int offset, int limit)

List<DashboardResult>

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);
                List<DashboardResult> results = ws.dashboard.getUserLastImportedMails();
foreach (DashboardResult dashboardResult in results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserLastImportedMailAttachments

Description:

MethodReturn valuesDescription

getUserLastImportedMailAttachments(int offset, int limit)

List<DashboardResult>

Returns a list of the last mails imported with attachments 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);
                List<DashboardResult> results = ws.dashboard.getUserLastImportedMailAttachments();
foreach (DashboardResult dashboardResult in results)
{
System.Console.WriteLine(dashboardResult.node.toString());
} } catch (Exception e) { System.Console.WriteLine(e.ToString()); } } } }

getUserSearches

Description:

MethodReturn valuesDescription

getUserSearches()

List<QueryParams>

Returns a list of the 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:

MethodReturn valuesDescription

findUserSearches(long qpId)

List<DashboardNodeResult>

Returns a list of nodes based in 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()); } } } }