<?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: Problems adding tags to documents using webscript API in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/problems-adding-tags-to-documents-using-webscript-api/m-p/267849#M220979</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think the problem is that you are posting the tags as a query string instead of posting JSON in the body of the request.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's how you'd do it in curl:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;curl -X POST -uadmin:admin "&lt;/SPAN&gt;&lt;A href="http://127.0.0.1:8080/alfresco/service/api/node/workspace/SpacesStore/637632bf-b633-472b-8696-a62e740df17c/tags" rel="nofollow noopener noreferrer"&gt;http://127.0.0.1:8080/alfresco/service/api/node/workspace/SpacesStore/637632bf-b633-472b-8696-a62e740df17c/tags&lt;/A&gt;&lt;SPAN&gt;" -H "content-type: application/json" -d @/Users/jpotts/Documents/code/tags.json&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And then in tags.json, you'd have:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;["tag1","tag2"]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also note that the content-type in the header needs to be set to application/json.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Jun 2012 23:29:55 GMT</pubDate>
    <dc:creator>jpotts</dc:creator>
    <dc:date>2012-06-22T23:29:55Z</dc:date>
    <item>
      <title>Problems adding tags to documents using webscript API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problems-adding-tags-to-documents-using-webscript-api/m-p/267848#M220978</link>
      <description>I'm trying to add tags to documents in Alfresco using Alfresco's webscript API.I manage to read the tags from documents using GET but when I try to POST to add a tag I get response code 500 from Alfresco and an error message in the Tomcat log including "…Expression tags is undefined…".I guest there</description>
      <pubDate>Sat, 05 May 2012 21:51:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problems-adding-tags-to-documents-using-webscript-api/m-p/267848#M220978</guid>
      <dc:creator>jacobs</dc:creator>
      <dc:date>2012-05-05T21:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problems adding tags to documents using webscript API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problems-adding-tags-to-documents-using-webscript-api/m-p/267849#M220979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think the problem is that you are posting the tags as a query string instead of posting JSON in the body of the request.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's how you'd do it in curl:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;curl -X POST -uadmin:admin "&lt;/SPAN&gt;&lt;A href="http://127.0.0.1:8080/alfresco/service/api/node/workspace/SpacesStore/637632bf-b633-472b-8696-a62e740df17c/tags" rel="nofollow noopener noreferrer"&gt;http://127.0.0.1:8080/alfresco/service/api/node/workspace/SpacesStore/637632bf-b633-472b-8696-a62e740df17c/tags&lt;/A&gt;&lt;SPAN&gt;" -H "content-type: application/json" -d @/Users/jpotts/Documents/code/tags.json&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And then in tags.json, you'd have:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;["tag1","tag2"]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also note that the content-type in the header needs to be set to application/json.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2012 23:29:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problems-adding-tags-to-documents-using-webscript-api/m-p/267849#M220979</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2012-06-22T23:29:55Z</dc:date>
    </item>
  </channel>
</rss>

