<?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: Extra field value in the response in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/extra-field-value-in-the-response/m-p/127333#M34612</link>
    <description>&lt;P&gt;I've made a basic tests using Alfresco REST Client SDK, sample available in&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/aborroy/alfresco-rest-client" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/aborroy/alfresco-rest-client&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Following code allows me to get "path" and "permissions" in the results:&lt;/P&gt;
&lt;PRE&gt;List&amp;lt;String&amp;gt; include = new ArrayList&amp;lt;&amp;gt;();
include.add("permissions");
include.add("path");

nodesApi.getNode("2ba6f3b7-fd7c-48b6-8f6e-dd6c250db89b", include, null, null);&lt;/PRE&gt;</description>
    <pubDate>Wed, 27 Oct 2021 07:44:20 GMT</pubDate>
    <dc:creator>angelborroy</dc:creator>
    <dc:date>2021-10-27T07:44:20Z</dc:date>
    <item>
      <title>Extra field value in the response</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/extra-field-value-in-the-response/m-p/127332#M34611</link>
      <description>&lt;P&gt;We are using feign client api's in our implementation to fetch the data from Alfresco.&lt;BR /&gt;Below dependency of alfresco is used n pom to fetch the data&lt;/P&gt;&lt;P&gt;&amp;lt;dependency&amp;gt;&lt;BR /&gt;&amp;lt;groupId&amp;gt;org.alfresco&amp;lt;/groupId&amp;gt;&lt;BR /&gt;&amp;lt;artifactId&amp;gt;alfresco-java-rest-api-spring-boot-starter&amp;lt;/artifactId&amp;gt;&lt;BR /&gt;&amp;lt;version&amp;gt;5.0.4&amp;lt;/version&amp;gt;&lt;BR /&gt;&amp;lt;/dependency&amp;gt;&lt;/P&gt;&lt;P&gt;In many if the API methods there is one parameter which is a List of String, in which we can define the extra parameters whose values is required in the response which we receive.&lt;BR /&gt;For Eg: path, permissions, aspectNames etc.&lt;BR /&gt;In one of our case we were trying to fetch multiple values like path and permissions both, but we are getting only one which we add first in the list.&lt;BR /&gt;For Eg: If you see the below code snippet in which we included permissions and path both. Please find the code snipper below.&lt;/P&gt;&lt;P&gt;public final NodeEntry getNode(String nodeId) {&lt;BR /&gt;NodesApiClient nodesApi = Feign.builder().contract(new SpringMvcContract()).decoder(feignDecoder())&lt;BR /&gt;.requestInterceptor(getBasicAuth()).target(NodesApiClient.class, url);&lt;BR /&gt;NodeEntry node;&lt;BR /&gt;List include = new ArrayList();&lt;BR /&gt;include.add("permissions");&lt;BR /&gt;include.add("path");&lt;BR /&gt;node = nodesApi.getNode(nodeId, include, null, null).getBody();&lt;BR /&gt;return node;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;When we run the above code, in the result we are getting permissions only and not the path and this we have observed in almost with all the api methods.&lt;BR /&gt;Note: When we hit the same api as a swagger in the browser then we get the expected results.&lt;/P&gt;&lt;P&gt;Are we doing something wrong here?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 07:02:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/extra-field-value-in-the-response/m-p/127332#M34611</guid>
      <dc:creator>om_bijawat</dc:creator>
      <dc:date>2021-10-27T07:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Extra field value in the response</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/extra-field-value-in-the-response/m-p/127333#M34612</link>
      <description>&lt;P&gt;I've made a basic tests using Alfresco REST Client SDK, sample available in&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/aborroy/alfresco-rest-client" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/aborroy/alfresco-rest-client&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Following code allows me to get "path" and "permissions" in the results:&lt;/P&gt;
&lt;PRE&gt;List&amp;lt;String&amp;gt; include = new ArrayList&amp;lt;&amp;gt;();
include.add("permissions");
include.add("path");

nodesApi.getNode("2ba6f3b7-fd7c-48b6-8f6e-dd6c250db89b", include, null, null);&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Oct 2021 07:44:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/extra-field-value-in-the-response/m-p/127333#M34612</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2021-10-27T07:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Extra field value in the response</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/extra-field-value-in-the-response/m-p/127334#M34613</link>
      <description>&lt;P&gt;Very strange,&lt;/P&gt;&lt;P&gt;Don't know why its not working for me.&lt;/P&gt;&lt;P&gt;Is working on community version can be the issue for this?&lt;/P&gt;&lt;P&gt;Are you working on community version or enterprise version of ACS.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 04:43:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/extra-field-value-in-the-response/m-p/127334#M34613</guid>
      <dc:creator>om_bijawat</dc:creator>
      <dc:date>2021-10-29T04:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Extra field value in the response</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/extra-field-value-in-the-response/m-p/127335#M34614</link>
      <description>&lt;P&gt;I reproduced your problem with the exact versions you are using.&lt;/P&gt;
&lt;P&gt;The problem has been detailed in following ticket:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/alfresco-java-sdk/issues/97" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/Alfresco/alfresco-java-sdk/issues/97&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;While this is being solved, you can apply this workaround:&lt;/P&gt;
&lt;PRE&gt;String nodeId = "8bb36efb-c26d-4d2b-9199-ab6922f53c28";
List&amp;lt;String&amp;gt; include = List.of("permissions,path");

Node node = nodesApi.getNode(nodeId, include, null, null).getBody().getEntry();

LOG.info("Permissions: " + node.getPermissions());
LOG.info("Path: " + node.getPath());&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Oct 2021 08:33:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/extra-field-value-in-the-response/m-p/127335#M34614</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2021-10-29T08:33:41Z</dc:date>
    </item>
  </channel>
</rss>

