-
RE: Webservice Api - Creating User, Role, Assigning user to role, Delete user and role
Hi Damian, Hi Matthieu<br> <br> Unfortunately it is not possible to create/delete groups and roles via the API. Theses functions are part of the Settings service. The API is limited to what the user can do within the web client. The only exception here are the user creation and role/group assignment, which already were mentioned by Damian.<br> <br> Thank you for your understanding! -
RE: Upload large files 4G and more to DocuWare
I've tested how the chunk upload of the .NET API is performed. The requests have to be as follows:
[POST] /DocuWare/Platform/FileCabinets/{{fcId}}/Documents
Headers:
Content-Type: {{FILETYPE}}
Content-Disposition: inline; filename={{FILENAME}}; modification-date="{{MODDATE}}"
X-File-Name: {{FILENAME}}
X-File-Size: {{FILESIZE}}
X-File-ModifiedDate: 07/22/2022 08:40:44
Cookie: {{COOKIES}}
Content-Length: {{CHUNKSIZE}}
Expect: 100-continue
Accept-Encoding: gzip
In the body add the chunk content
For each additional chunk use the following URI:
[POST] /DocuWare/Platform/FileCabinets/{{fcId}}/Documents?loc={{CHUNKSIZE * CHUNKNUMBER}}&chunkReference={{CHUNKREFERENCEGUID}}
- The loc parameter consists of the chosen chunk size (e.g. 300000 and the index of the chunk starting at 0). The first chunk has no loc, the second chunk has 300000 * 1 = 300000 the second has 300000 * 2 = 600000 and so on...
- The chunkReference parameter has to contain the guid from the response from the last response (Document -> FileChunk -> LastChunkId)
The header and the body are built the same way as in the first request. I attach a screenshot which show a chunk upload in Fiddler.
Please mind, that the upload might fail for large files because of time outs that might occur.
Best Regards,
Leopold -
RE: Dokumente zur einer Rechnung vor Mailversand finden und zu einer PDF zusammenführe
Antwort aus dem Supportfall:
Leider ist uns kein Tool dieser Art bekannt. Die Vorgehensweise wäre jedoch wie folgt:- Entwicklung eines Webservices, welcher auf die DocuWare API zugreift
- Dieser nimmt als Parameter die DocIDs der zu klammernden Dokumente an und klammert diese
- Im Workflow werden zunächst alle DocIDs herausgesucht
- Zuletzt wird eine Anfrage mit den DocIDs an den Webservice gesendet (Webservice Aktivität)
-
RE: Verlinkung aus DocuWare in Fremdprogramm (ERP)
Lösung aus dem Supportfall:
Um einen Link zu einer Workflow-Aufgabe hinzuzufügen, können Sie wie folgt vorgehen:- Öffnen Sie die Workflow-Aufgabe im Workflow Designer
- Wählen Sie die Entscheidung, welche den Link enthalten soll
- Wechseln Sie zum Reiter "Dialog"
- Fügen Sie über die +-Schaltfläche ein neues Dialogfeld vom Typ Link hinzu
- Im Anschluss können Sie den Link über das Bleistift Symbol konfigurieren
Viele Grüße
Leopold Pohlmann -
RE: Fulltext-Snapshot über API abgreifen
Hallo Herr Kreft,
hier noch einmal die Lösung aus dem Supportfall:
Sie können den Textshot mit Hilfe der folgenden Methode abrufen:using DocuWare.Platform.ServerClient.Content;
private static List<string> GetAllWordsInTextshot(Document document, int sectionIndex)
{
Section section = document.GetSectionsFromSectionsRelation().Section[sectionIndex].GetSectionFromSelfRelation();var entriesInTextshot = new List<string>();List<PageContent> textshotPages = section.GetDocumentContentFromTextshotRelation().Pages;
foreach (PageContent pageContent in textshotPages)
{
foreach (RectangleBase rectangleBase in pageContent.Items)
{
if (rectangleBase.GetType() == typeof(TextZone)) //There are other elements in RectangleBase like "Rulerline"
{
TextZone textZone = (TextZone)rectangleBase;foreach (Line textZoneLine in textZone.Ln)
{
foreach (var lineItem in textZoneLine.Items)
{
Word word = (Word)lineItem;
entriesInTextshot.Add(word.Value);
}
}
}
}
}return entriesInTextshot;
} -
RE: Conditions for getting a image
The /image call should work for each file type that can be shown in Web Client viewer. The only exception for this are data sets, meaning documents with only index data and no actual file attached to it. -
RE: SDK - Clipping Documents via API
Solution of the Support request:
Following example code, shows how to clip a new document to a existing document in a file cabinet. The docid was used to fetch the documents. This procedure can be advanced to an unlimited amount of documents, by using a loop.public static void ClipDocuments()
{
// Get id of existing document from filecabinet
FileCabinet fc = organization.GetFileCabinetsFromFilecabinetsRelation().FileCabinet.First(f => f.Id == fcid);
int doc1 = fc.GetDocumentsResult().Items.First(d => d.Id == docid).Id;// Upload second doc and fetch docid
int doc2 = EasyUploadToFileCabinet(fc);// ClipDocuments documents
List<int> docids = new List<int>()
{
doc1,
doc2,
};Document mergedDocument = fc.PutToContentMergeOperationRelationForDocument
(
new ContentMergeOperationInfo()
{
Documents = docids,
Operation = ContentMergeOperation.Clip,
Force = true,
}
);
}private static int EasyUploadToFileCabinet(FileCabinet fc)
{
var document = fc.EasyUploadSingleDocument(
new System.IO.FileInfo("C:/example.pdf"));return document.Id;
} -
RE: How I can clip new files in basket into an existing document in cabinet using platform API?
At first copy / move the document from the basket to the file cabinet (Copy index data + content). Afterwards Clip the documents inside the file cabinet.Example code:public static void ClipDocuments() { // Get documents Document docBasket = GetDocument("<<fcID>>", <<docID>); Document docFileCabinet = GetDocument("<<fcID>>", <<docID>>); // Get file cabinet + basket and copy document FileCabinet basket = connection.GetFileCabinet(<<BasketID>>).GetFileCabinetFromSelfRelation(); FileCabinet fc = connection.GetFileCabinet("<<FCID>>").GetFileCabinetFromSelfRelation(); int docID = CopyFromBasketToFileCabinet(docBasket, fc); // Clip the documents ContentMergeOperationInfo operationInfo = new ContentMergeOperationInfo() { Documents = new List<int>() { docFileCabinet.Id, docID }, Force = true, Operation = ContentMergeOperation.Clip, }; fc.PutToContentMergeOperationRelationForDocument(operationInfo); } private static Document GetDocument(string FCGuid, int docID) { return connection.GetFromDocumentForDocumentAsync(docID, FCGuid).Result; } private static int CopyFromBasketToFileCabinet(Document docBasket, FileCabinet fc) { DialogInfo dialog = fc.GetDialogInfosFromStoresRelation().Dialog.First(d => d.FileCabinetId == fc.Id); Document docNew = dialog.PostToStoreDocumentRelationForDocument(docBasket); docNew.PostToSectionsRelationForSection("application/pdf", docBasket.Sections[0].GetSectionFromSelfRelation().GetStreamFromContentRelation()); return docNew.Id; }
-
RE: REST API - How to delete first section of a document ?
You can delete a section via REST-API by sending a request to the endpoint within the platform using the DELETE method. You can use following REST call to delete a section:
[DELETE] https://{URI}/DocuWare/Platform/FileCabinets/{FCID}/Sections/{SectionID}