<?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: creating user with Rest API in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/creating-user-with-rest-api/m-p/165297#M118991</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We have a test for creating users, see org.activiti.rest.service.api.identity.UserCollectionResourceTest:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt; ObjectNode requestNode = objectMapper.createObjectNode();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; requestNode.put("id", "testuser");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; requestNode.put("firstName", "Frederik");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; requestNode.put("lastName", "Heremans");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; requestNode.put("password", "test");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; requestNode.put("email", "no-reply@activiti.org");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ClientResource client = getAuthenticatedClient(RestUrls.createRelativeResourceUrl(RestUrls.URL_USER_COLLECTION, "testuser"));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Representation response = client.post(requestNode);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; assertEquals(Status.SUCCESS_CREATED, client.getResponse().getStatus());&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Double-check if the JSON you create is valid. It's recommended that you use some kind of JSON framework, instead of creating the JSON's by hand. This is less error-prone and will guarantee valid syntax and escaping…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Dec 2013 09:06:09 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2013-12-05T09:06:09Z</dc:date>
    <item>
      <title>creating user with Rest API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/creating-user-with-rest-api/m-p/165296#M118990</link>
      <description>Hi,I am trying to create new user in Activiti Engine through Rest API and i am calling "identity/users" Rest call for creating users.I am passing below json from Enitity.hp.setEntity(new StringEntity("{ \"id\":\"tijs\",\"firstName\":\"Tijs\",\"lastName\":\"Barrez\", \"email\":\"no-replyalfresco.org\</description>
      <pubDate>Tue, 26 Nov 2013 09:15:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/creating-user-with-rest-api/m-p/165296#M118990</guid>
      <dc:creator>sureshtellakula</dc:creator>
      <dc:date>2013-11-26T09:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: creating user with Rest API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/creating-user-with-rest-api/m-p/165297#M118991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We have a test for creating users, see org.activiti.rest.service.api.identity.UserCollectionResourceTest:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt; ObjectNode requestNode = objectMapper.createObjectNode();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; requestNode.put("id", "testuser");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; requestNode.put("firstName", "Frederik");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; requestNode.put("lastName", "Heremans");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; requestNode.put("password", "test");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; requestNode.put("email", "no-reply@activiti.org");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ClientResource client = getAuthenticatedClient(RestUrls.createRelativeResourceUrl(RestUrls.URL_USER_COLLECTION, "testuser"));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Representation response = client.post(requestNode);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; assertEquals(Status.SUCCESS_CREATED, client.getResponse().getStatus());&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Double-check if the JSON you create is valid. It's recommended that you use some kind of JSON framework, instead of creating the JSON's by hand. This is less error-prone and will guarantee valid syntax and escaping…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Dec 2013 09:06:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/creating-user-with-rest-api/m-p/165297#M118991</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-12-05T09:06:09Z</dc:date>
    </item>
  </channel>
</rss>

