Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Met deze endpoint kan je een WorkspaceItem aanmaken in een bepaald proces. Als het HTTP-verzoek succesvol is uitgevoerd krijg je het aangemaakte WorkspaceItemId terug in de body van de response.

...

Alle keys gemarkeerd met een * required zijn verplicht om mee te geven.

Key

Type

Mogelijke waardes

Omschrijving

Voorbeeld

ProcessName * required

string

Vul naam van het DocuFlow proces in

Offertes

ExternalId

string

Je kan hier een waarde meegeven zodat je het aangemaakte WorkspaceItem kan herkennen o.b.v. waarde uit je integratie.

123

Author

string

Vul de gebruikersnaam in van de DocuFlow gebruiker die dit WorkspaceItem aan heeft gemaakt. Meer info: https://documizers.atlassian.net/wiki/spaces/DK/pages/2688253958/DocuFlow+API+-+Uitvoeren+HTTP-verzoek#%5BinlineExtension%5DRequest-body---Author

JohnDoe

ShouldBeNotEditableItem

bolean

  • true

  • false

Wil je het WorkspaceItem beveiligen zodat deze niet meer geopend of bewerkt kan worden, vul dan true in.

false

File.Content * required

file

Elk WorkspaceItem moet een bestand hebben. DocuFlow is namelijk document-gebaseerd. Dit document mag leeg zijn of enkel een spatie bevatten. Maak een leeg .txt bestand aan bijvoorbeeld.

test.txt

File.Name

string

Vul de naam van het bestand in, zonder extensie

test

File.Extension

string

Vul de extensie van het bestand in, zonder de punt (.).

txt

File.FileName

Tags

DisplayName

...

Klap een programmeertaal open om het voorbeeld in te zien.

Expand
titlecUrl
Code Block
languagenone
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://documizersjeffrey.platform.documizers.com/DocuFlow/api/1.0/WorkspaceItems");
request.Headers.Add("ApiKey", "6031086841ef43c0b6177e2fb13a69f6fb6b193468e2415d88de57ed6aa2b33c");
request.Headers.Add("Cookie", ".AspNetCore.Antiforgery.TnwmgG1f2m8=CfDJ8BTpycctQLNOlxhLos9AP42t26Q-lRfgV6AtH3UWMPnvUTSe04fq2GECO1x5q2uCkPzUt4niT6HOhszq2vfNkUN3qLlgi8Ff00ucaA4iGI9p6KjivPeHJ_G3JVtembT2hgg3S7ZopIzuxcMTXmBC0go; XSRF-TOKEN=CfDJ8BTpycctQLNOlxhLos9AP40HkASas46E2wohyRuAH6TpR2XNmabm8npO_CDY97s1GhoEHBcqDV25MeSkjbVKiZoeFhFa0hX1LcDtzitxIMb5G8H3RkPE_qVWJITsAc8lu-ZBnuQJvIU_uzvzg3vXSv0");
var content = new MultipartFormDataContent();
content.Add(new StringContent("Offertes"), "ProcessName");
content.Add(new StringContent("123"), "ExternalId");
content.Add(new StringContent("JohnDoe"), "Author");
content.Add(new StringContent("true"), "ShouldBeNotEditableItem");
content.Add(new StreamContent(File.OpenRead("/C:/Users/JeffreyRijdes/OneDrive - Documizers B.V/Documenten/Bureaublad/TESTDOCUMENTEN/123.txt")), "File.Content", "/C:/Users/JeffreyRijdes/OneDrive - Documizers B.V/Documenten/Bureaublad/TESTDOCUMENTEN/123.txt");
content.Add(new StringContent("test"), "File.Name");
content.Add(new StringContent("txt"), "File.Extension");
content.Add(new StringContent(""), "File.FileName");
content.Add(new StringContent(""), "Tags");
content.Add(new StringContent(""), "DisplayName");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
curl --location 'https://documizersdemo.platform.documizers.com/DocuFlow/api/1.0/WorkspaceItems' \
--header 'ApiKey: 6031086841ef43c0b6177e2fb13a69f6fb6b193c' \
--header 'Cookie: .AspNetCore.Antiforgery.TnwmgG1f2m8=CfDJ8BTpycctQLNOlxhLos9AP42t26Q-lRfgV6AtH3UWMPnvUTSe04fq2GECO1x5q2uCkPzUt4niT6HOhszq2vfNkUN3qLlgi8Ff00ucaA4iGI9p6KjivPeHJ_G3JVtembT2hgg3S7ZopIzuxcMTXmBC0go; XSRF-TOKEN=CfDJ8BTpycctQLNOlxhLos9AP40HkASas46E2wohyRuAH6TpR2XNmabm8npO_CDY97s1GhoEHBcqDV25MeSkjbVKiZoeFhFa0hX1LcDtzitxIMb5G8H3RkPE_qVWJITsAc8lu-ZBnuQJvIU_uzvzg3vXSv0' \
--form 'ProcessName="Offertes"' \
--form 'ExternalId="123"' \
--form 'Author="JohnDoe"' \
--form 'ShouldBeNotEditableItem="true"' \
--form 'File.Content=@"123.txt"' \
--form 'File.Name="test"' \
--form 'File.Extension="txt"' \
--form 'File.FileName=""' \
--form 'Tags=""' \
--form 'DisplayName=""'
Expand
titleC# - HTTPClient
Code Block
languagec#
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://documizersdemo.platform.documizers.com/DocuFlow/api/1.0/WorkspaceItems");
request.Headers.Add("ApiKey", "6031086841ef43c0b6177e2fb13a69f67ed6aa2b33c");
request.Headers.Add("Cookie", ".AspNetCore.Antiforgery.TnwmgG1f2m8=CfDJ8BTpycctQLNOlxhLos9AP42t26Q-lRfgV6AtH3UWMPnvUTSe04fq2GECO1x5q2uCkPzUt4niT6HOhszq2vfNkUN3qLlgi8Ff00ucaA4iGI9p6KjivPeHJ_G3JVtembT2hgg3S7ZopIzuxcMTXmBC0go; XSRF-TOKEN=CfDJ8BTpycctQLNOlxhLos9AP40HkASas46E2wohyRuAH6TpR2XNmabm8npO_CDY97s1GhoEHBcqDV25MeSkjbVKiZoeFhFa0hX1LcDtzitxIMb5G8H3RkPE_qVWJITsAc8lu-ZBnuQJvIU_uzvzg3vXSv0");
var content = new MultipartFormDataContent();
content.Add(new StringContent("Offertes"), "ProcessName");
content.Add(new StringContent("123"), "ExternalId");
content.Add(new StringContent("JohnDoe"), "Author");
content.Add(new StringContent("true"), "ShouldBeNotEditableItem");
content.Add(new StreamContent(File.OpenRead("123.txt")), "File.Content", "123.txt");
content.Add(new StringContent("test"), "File.Name");
content.Add(new StringContent("txt"), "File.Extension");
content.Add(new StringContent(""), "File.FileName");
content.Add(new StringContent(""), "Tags");
content.Add(new StringContent(""), "DisplayName");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Expand
titlePHP cUrl
Code Block
languagec#
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://documizersdemo.platform.documizers.com/DocuFlow/api/1.0/WorkspaceItems',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('ProcessName' => 'Offertes','ExternalId' => '123','Author' => 'JohnDoe','ShouldBeNotEditableItem' => 'true','File.Content'=> new CURLFILE('123.txt'),'File.Name' => 'test','File.Extension' => 'txt','File.FileName' => '','Tags' => '','DisplayName' => ''),
  CURLOPT_HTTPHEADER => array(
    'ApiKey: 6031086841ef43c0b6177e57ed6aa2b33c',
    'Cookie: .AspNetCore.Antiforgery.TnwmgG1f2m8=CfDJ8BTpycctQLNOlxhLos9AP42t26Q-lRfgV6AtH3UWMPnvUTSe04fq2GECO1x5q2uCkPzUt4niT6HOhszq2vfNkUN3qLlgi8Ff00ucaA4iGI9p6KjivPeHJ_G3JVtembT2hgg3S7ZopIzuxcMTXmBC0go; XSRF-TOKEN=CfDJ8BTpycctQLNOlxhLos9AP40HkASas46E2wohyRuAH6TpR2XNmabm8npO_CDY97s1GhoEHBcqDV25MeSkjbVKiZoeFhFa0hX1LcDtzitxIMb5G8H3RkPE_qVWJITsAc8lu-ZBnuQJvIU_uzvzg3vXSv0'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Expand
titleJavascript - jQuery
Code Block
languagejs
var form = new FormData();
form.append("ProcessName", "Offertes");
form.append("ExternalId", "123");
form.append("Author", "JohnDoe");
form.append("ShouldBeNotEditableItem", "true");
form.append("File.Content", fileInput.files[0], "

...

123.txt");
form.append("File.Name", "test");
form.append("File.Extension", "txt");
form.append("File.FileName", "");
form.append("Tags", "");
form.append("DisplayName", "");

var settings = {
  "url": "https://

...

documizersdemo.platform.documizers.com/DocuFlow/api/1.0/WorkspaceItems",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "ApiKey": "

...

6031086841ef43c0b6177e2fb13a69aa2b33c",
    "Cookie": ".AspNetCore.Antiforgery.TnwmgG1f2m8=CfDJ8BTpycctQLNOlxhLos9AP42t26Q-lRfgV6AtH3UWMPnvUTSe04fq2GECO1x5q2uCkPzUt4niT6HOhszq2vfNkUN3qLlgi8Ff00ucaA4iGI9p6KjivPeHJ_G3JVtembT2hgg3S7ZopIzuxcMTXmBC0go; XSRF-TOKEN=CfDJ8BTpycctQLNOlxhLos9AP40HkASas46E2wohyRuAH6TpR2XNmabm8npO_CDY97s1GhoEHBcqDV25MeSkjbVKiZoeFhFa0hX1LcDtzitxIMb5G8H3RkPE_qVWJITsAc8lu-ZBnuQJvIU_uzvzg3vXSv0"
  },
  "processData": false,
  "mimeType": "multipart/form-data",
  "contentType": false,
  "data": form
};

$.ajax(settings).done(function (response) {
  console.log(response);
});