<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using bulk import in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/using-bulk-import/m-p/137369#M36851</link>
    <description>&lt;P&gt;I got it to work using postman, well. The only thing missing is that bulkimport can't see my filesystem so i have to copy over all the files to the same docker container where the bulk import thingy sits and make the exact same system_location there.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now i need to convert this postman thingy to python.&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-04-14_15-54.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1029iDEDB01A1B6205164/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Apr 2021 12:55:12 GMT</pubDate>
    <dc:creator>Taaviansper</dc:creator>
    <dc:date>2021-04-14T12:55:12Z</dc:date>
    <item>
      <title>Using bulk import</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/using-bulk-import/m-p/137367#M36849</link>
      <description>&lt;P&gt;I have some questions regarding bulk import&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.alfresco.com/content-services/6.1/admin/import-transfer/#import-tool-fieldsvals" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.alfresco.com/content-services/6.1/admin/import-transfer/#import-tool-fieldsvals&lt;/A&gt;&lt;/P&gt;&lt;P&gt;A former&amp;nbsp;&lt;SPAN&gt;colleague used this to import data.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;curl 'https://'${ALFRESCOHOST}'/alfresco/service/bulkfsimport/initiate' \
          -H 'Authorization: Basic '${PWDHASH}'' \
          -L POST --url "https://'${ALFRESCOHOST}'/alfresco/s/bulkfsimport/initiate" --data "targetNodeRef=workspace://SpacesStore/${USERDIRUUID}&amp;amp;sourceDirectory=${CONTAINERPATH}/${OLDDHSNAME}_k&amp;amp;existingFileMode.skip"&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;I've been trying to do a similar thing on python, but how do I exactly approach this? It seems to me that&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I've made something like this.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;def bulk_import(row, options, b64encoded, data):
      url = 'https://' + options['servername'] + '/alfresco/service/bulkfsimport/initiate'
      headers={"Authorization": f'Basic {b64encoded}'}
      response = requests.post(url=url, data=data)
      return response

data = f'targetNodeRef=workspace://SpacesStore/{personDirectoryId}&amp;amp;sourceDirectory={row["system_location"]}&amp;amp;existingFileMode.skip'&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;But it gives me an error. 401.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 11:57:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/using-bulk-import/m-p/137367#M36849</guid>
      <dc:creator>Taaviansper</dc:creator>
      <dc:date>2021-04-14T11:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using bulk import</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/using-bulk-import/m-p/137368#M36850</link>
      <description>&lt;P&gt;First problem solved, I forgot to add headers to request.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second problem still active:&amp;nbsp;Request sent by the client was syntactically incorrect.&amp;nbsp;&lt;/P&gt;&lt;P&gt;03140066 Error: neither parameter &amp;amp;#39;targetNodeRef&amp;amp;#39; nor parameter &amp;amp;#39;targetPath&amp;amp;#39; was provided, but at least one is required !&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 11:59:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/using-bulk-import/m-p/137368#M36850</guid>
      <dc:creator>Taaviansper</dc:creator>
      <dc:date>2021-04-14T11:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Using bulk import</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/using-bulk-import/m-p/137369#M36851</link>
      <description>&lt;P&gt;I got it to work using postman, well. The only thing missing is that bulkimport can't see my filesystem so i have to copy over all the files to the same docker container where the bulk import thingy sits and make the exact same system_location there.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now i need to convert this postman thingy to python.&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-04-14_15-54.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1029iDEDB01A1B6205164/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 12:55:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/using-bulk-import/m-p/137369#M36851</guid>
      <dc:creator>Taaviansper</dc:creator>
      <dc:date>2021-04-14T12:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using bulk import</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/using-bulk-import/m-p/137370#M36852</link>
      <description>&lt;PRE&gt;data = {'targetNodeRef': f'workspace://SpacesStore/{create_folder_entry["id"]}', 'sourceDirectory' : f'{row["system_location"]}', 'existingFileMode.skip': ""}

 headers={"Authorization": f'Basic {b64encoded}', 'Content-Type': 'application/x-www-form-urlencoded'}&lt;/PRE&gt;&lt;P&gt;This worked!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 12:59:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/using-bulk-import/m-p/137370#M36852</guid>
      <dc:creator>Taaviansper</dc:creator>
      <dc:date>2021-04-14T12:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using bulk import</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/using-bulk-import/m-p/137371#M36853</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/85231"&gt;@Taaviansper&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Great that you got a solution &amp;amp; thanks for updating with the solution - really useful to other users.&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 13:38:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/using-bulk-import/m-p/137371#M36853</guid>
      <dc:creator>EddieMay</dc:creator>
      <dc:date>2021-04-15T13:38:20Z</dc:date>
    </item>
  </channel>
</rss>

