Vues :

Question:
How is it possible to create a URL Integration using the GAPI?

Answer:
The appropriate namespace to use is "DocuWare.Gapi.Utils.Web.DWIntegration", for this you will find an example written in C# below:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DocuWare.Gapi.Utils.Web.DWIntegration;
namespace GAPI_WebClientEncyrption

class Program
 
static void Main(string[] args)
 

//Prepare DWIntegrationURL
DWIntegrationInfo integrationInfo = new DWIntegrationInfo("presentationvm", "DocuWare/Platform/WebClient/", "", false);
integrationInfo.Scheme = "http";
integrationInfo.OrganizationId = "1";
//Example 1: Generate URL plain text
DWIntegrationUrl plaintextURL = new DWIntegrationUrl(integrationInfo, IntegrationType.Viewer);
plaintextURL.Parameters.FileCabinetGuid = new Guid("366f6b7f-af2b-47ac-8ee7-01dbb2211576");
//plaintextURL.Parameters.DocId = "1";
plaintextURL.Parameters.Query = "[COMPANY] = \"Peters Engineering\" AND [DOCTYPE] = \"Invoice in\"";
plaintextURL.Parameters.UserCredentials = new UserCredentials("admin", "admin");
Console.WriteLine("Plain text URL:");
Console.WriteLine(plaintextURL.Url.ToString());

//Example 2: Generate encrypted URL
DWIntegrationUrlEncrypted encryptedURL = new DWIntegrationUrlEncrypted(integrationInfo, IntegrationType.Viewer, "123MyPassphrase!");
encryptedURL.Parameters.FileCabinetGuid = new Guid("366f6b7f-af2b-47ac-8ee7-01dbb2211576");
encryptedURL.Parameters.DocId = "1";
encryptedURL.Parameters.UserCredentials = new UserCredentials("admin", "admin");

Console.WriteLine("Encrypted URL:");
Console.WriteLine(encryptedURL.Url.ToString());

//Example 3: Generate Login URL
DWWebUrlLoginParameters loginParams = new DWWebUrlLoginParameters();
loginParams.UserCredentials = new UserCredentials("admin", "admin");
DWWebClientLoginUrlEncrypted loginUrl = new DWWebClientLoginUrlEncrypted(integrationInfo, loginParams, "123MyPassphrase!");
Console.WriteLine("Login URL:");
Console.WriteLine(loginUrl.Url.ToString());
Console.ReadLine();