<?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 listSharedLinks() by non-empty path in JAVA SDK in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/listSharedLinks-by-non-empty-path-in-JAVA-SDK/m-p/690021#M3408</link>
    <description>&lt;P&gt;I am trying to list shared links using the below code and it works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I don't need ALL of the sharedLinks. This list is huge.&lt;/P&gt;&lt;P&gt;How can I specify a path like this&amp;nbsp;&lt;STRONG&gt;listSharedLinks(String path)&lt;/STRONG&gt; ? I want to list shared links only for this path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;List&amp;lt;SharedLinkMetadata&amp;gt; sharedLinkMetadataList =
        client
            .asMember(memberId)
            .withPathRoot(PathRoot.namespaceId(rootNS))
            .sharing()
            .listSharedLinks()
            .getLinks();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The Java SDK docs says - But I see no overloaded methods where I can provide a non-empty path.&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2"&gt;&lt;EM&gt;If no path is given, returns a list of all shared links for the current user.&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;If a non-empty path is given, returns a list of all shared links that allow access to the given path - direct links to the given path and links to parent folders of the given path. Links to parent folders can be suppressed by setting direct_only to true.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;EM&gt;Please Help &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@D125BC1199F50B38C96BACC18103EF48/emoticons/1f64f.png" alt=":folded_hands:" title=":folded_hands:" /&gt;&amp;nbsp;Thanks a lot.&amp;nbsp;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jun 2023 05:06:53 GMT</pubDate>
    <dc:creator>abhinav-gogoi-clairvoyant</dc:creator>
    <dc:date>2023-06-07T05:06:53Z</dc:date>
    <item>
      <title>listSharedLinks() by non-empty path in JAVA SDK</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/listSharedLinks-by-non-empty-path-in-JAVA-SDK/m-p/690021#M3408</link>
      <description>&lt;P&gt;I am trying to list shared links using the below code and it works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I don't need ALL of the sharedLinks. This list is huge.&lt;/P&gt;&lt;P&gt;How can I specify a path like this&amp;nbsp;&lt;STRONG&gt;listSharedLinks(String path)&lt;/STRONG&gt; ? I want to list shared links only for this path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;List&amp;lt;SharedLinkMetadata&amp;gt; sharedLinkMetadataList =
        client
            .asMember(memberId)
            .withPathRoot(PathRoot.namespaceId(rootNS))
            .sharing()
            .listSharedLinks()
            .getLinks();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The Java SDK docs says - But I see no overloaded methods where I can provide a non-empty path.&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2"&gt;&lt;EM&gt;If no path is given, returns a list of all shared links for the current user.&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;If a non-empty path is given, returns a list of all shared links that allow access to the given path - direct links to the given path and links to parent folders of the given path. Links to parent folders can be suppressed by setting direct_only to true.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;EM&gt;Please Help &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@D125BC1199F50B38C96BACC18103EF48/emoticons/1f64f.png" alt=":folded_hands:" title=":folded_hands:" /&gt;&amp;nbsp;Thanks a lot.&amp;nbsp;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 05:06:53 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/listSharedLinks-by-non-empty-path-in-JAVA-SDK/m-p/690021#M3408</guid>
      <dc:creator>abhinav-gogoi-clairvoyant</dc:creator>
      <dc:date>2023-06-07T05:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: listSharedLinks() by non-empty path in JAVA SDK</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/listSharedLinks-by-non-empty-path-in-JAVA-SDK/m-p/690028#M3409</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1711997"&gt;@abhinav-gogoi-clairvoyant&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Take a look &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v5.4.3/com/dropbox/core/v2/sharing/ListSharedLinksBuilder.html" target="_blank" rel="noopener"&gt;here&lt;/A&gt; for possible solution.&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 07:31:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/listSharedLinks-by-non-empty-path-in-JAVA-SDK/m-p/690028#M3409</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-06-07T07:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: listSharedLinks() by non-empty path in JAVA SDK</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/listSharedLinks-by-non-empty-path-in-JAVA-SDK/m-p/690137#M3410</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1711997"&gt;@abhinav-gogoi-clairvoyant&lt;/a&gt; Yes, as Здравко helpfully linked to, you can use ListSharedLinksBuilder to specify a path. In particular, you would use &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v5.4.3/com/dropbox/core/v2/sharing/ListSharedLinksBuilder.html#withPath(java.lang.String)" target="_self"&gt;ListSharedLinksBuilder.withPath&lt;/A&gt;. (The Java SDK uses this "builder" pattern to support passing parameters on many calls like this.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Working from your sample code, that would look like this:&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;List&amp;lt;SharedLinkMetadata&amp;gt; sharedLinkMetadataList =
        client
                .asMember(memberId)
                .withPathRoot(PathRoot.namespaceId(rootNS))
                .sharing()
                .listSharedLinksBuilder()
                .withPath(path)
                .start()
                .getLinks();&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 14:03:00 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/listSharedLinks-by-non-empty-path-in-JAVA-SDK/m-p/690137#M3410</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-06-07T14:03:00Z</dc:date>
    </item>
  </channel>
</rss>

