<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Is there any rest api to retrieve Related Assets for a particular article?</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=71364322" />
  <subtitle>Is there any rest api to retrieve Related Assets for a particular article?</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=71364322</id>
  <updated>2026-04-06T20:52:44Z</updated>
  <dc:date>2026-04-06T20:52:44Z</dc:date>
  <entry>
    <title>RE: Is there any rest api to retrieve Related Assets for a particular artic</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119139741" />
    <author>
      <name>Lee Jordan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119139741</id>
    <updated>2020-05-11T22:03:17Z</updated>
    <published>2020-05-11T22:03:17Z</published>
    <summary type="html">Are there any ADT examples of getting related assets from an asset publisher (set to documents?). So a document has a related document to it but I can&amp;#39;t find documentation on how to code a template to display a related asset??&lt;br /&gt;This is wonderful here ...&lt;br /&gt;&lt;br /&gt;​​​​​​​&lt;br /&gt;&lt;a href="https://github.com/jordanamorais/lfrgs-frontend-samples/tree/master/adts"&gt;https://github.com/jordanamorais/lfrgs-frontend-samples/tree/master/adts&lt;/a&gt;&lt;br /&gt;But not finding the code to drag out related assets?</summary>
    <dc:creator>Lee Jordan</dc:creator>
    <dc:date>2020-05-11T22:03:17Z</dc:date>
  </entry>
  <entry>
    <title>RE: Is there any rest api to retrieve Related Assets for a particular artic</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=71461615" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=71461615</id>
    <updated>2016-03-15T13:54:31Z</updated>
    <published>2016-03-15T13:54:31Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;The classNameId you can get by using /api/jsonws?signature=%2Fclassname%2Ffetch-class-name-id-1-clazz .. where the name of the java class the java class that is it associated with. If you run this query against your database:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;
SELECT * FROM ClassName_ where value like '%Journal%';
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;But I see now what you mean in that there doesn't appear to be an (obvious) endpoint for retrieving the asset entries that are associated to a Journal Article. We have a separate thread (&lt;a href="https://www.liferay.com/community/forums/-/message_boards/message/71461488"&gt;https://www.liferay.com/community/forums/-/message_boards/message/71461488&lt;/a&gt;) going as well which I think is for another question you posted as part of  the same problem you are trying to solve so perhaps we can park this for the moment.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2016-03-15T13:54:31Z</dc:date>
  </entry>
  <entry>
    <title>RE: Is there any rest api to retrieve Related Assets for a particular artic</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=71430309" />
    <author>
      <name>S H</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=71430309</id>
    <updated>2016-03-15T05:22:46Z</updated>
    <published>2016-03-15T05:22:46Z</published>
    <summary type="html">&lt;div class="quote-title"&gt;Andrew Jardine:&lt;/div&gt;&lt;blockquote&gt;I think to do this you need to use the AssetEntry portion of the JSON API with a classNameId referencing the JournalArticle and a classPK being the ID for the article with the related assets you want to retrieve.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Thanks for the reply.   I tried to look at the AssetEntry portion of the JSON API , but the only api require classNameId  and classPK  is /assetentry/increment-view-counter , I don&amp;#39;t think this one is able to retrieve Related Assets.   I noticed there is api /assetentry/get-entries , this one looks like can be used to return what I want.  However, the input parameter is com.liferay.portlet.asset.service.persistence.AssetEntryQuery , and it returns java.util.List.  I am not sure how to pass AssetEntryQuery to the rest api and get the results.  Is there any sample code I can take a reference?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Below is sample data return by http://localhost:8080/api/jsonws/journalarticle/get-article/group-id/21290/article-id/21310, from the output, what should I use to build the AssetEntryQuery ?&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&amp;#34;articleId&amp;#34;: &amp;#34;21310&amp;#34;,&lt;br /&gt;&amp;#34;classNameId&amp;#34;: 0,&lt;br /&gt;&amp;#34;classPK&amp;#34;: 0,&lt;br /&gt;&amp;#34;companyId&amp;#34;: 20155,&lt;br /&gt;&amp;#34;content&amp;#34;: &amp;#34;&amp;#34;,&lt;br /&gt;&amp;#34;createDate&amp;#34;: 1457924968000,&lt;br /&gt;&amp;#34;description&amp;#34;: &amp;#34;&amp;#34;,&lt;br /&gt;&amp;#34;descriptionCurrentValue&amp;#34;: &amp;#34;&amp;#34;,&lt;br /&gt;&amp;#34;displayDate&amp;#34;: 1457414820000,&lt;br /&gt;&amp;#34;expirationDate&amp;#34;: null,&lt;br /&gt;&amp;#34;folderId&amp;#34;: 0,&lt;br /&gt;&amp;#34;groupId&amp;#34;: 21290,&lt;br /&gt;&amp;#34;id&amp;#34;: 21951,&lt;br /&gt;&amp;#34;indexable&amp;#34;: true,&lt;br /&gt;&amp;#34;layoutUuid&amp;#34;: &amp;#34;&amp;#34;,&lt;br /&gt;&amp;#34;modifiedDate&amp;#34;: 1457938208000,&lt;br /&gt;&amp;#34;resourcePrimKey&amp;#34;: 21312,&lt;br /&gt;&amp;#34;reviewDate&amp;#34;: null,&lt;br /&gt;&amp;#34;smallImage&amp;#34;: false,&lt;br /&gt;&amp;#34;smallImageId&amp;#34;: 0,&lt;br /&gt;&amp;#34;smallImageURL&amp;#34;: &amp;#34;&amp;#34;,&lt;br /&gt;&amp;#34;status&amp;#34;: 0,&lt;br /&gt;&amp;#34;statusByUserId&amp;#34;: 20434,&lt;br /&gt;&amp;#34;statusByUserName&amp;#34;: &amp;#34;Test Test&amp;#34;,&lt;br /&gt;&amp;#34;statusDate&amp;#34;: 1457938208000,&lt;br /&gt;&amp;#34;structureId&amp;#34;: &amp;#34;21305&amp;#34;,&lt;br /&gt;&amp;#34;templateId&amp;#34;: &amp;#34;21307&amp;#34;,&lt;br /&gt;&amp;#34;title&amp;#34;: &amp;#34;&amp;#34;,&lt;br /&gt;&amp;#34;titleCurrentValue&amp;#34;: &amp;#34;Seagate To Participate In Investor Event&amp;#34;,&lt;br /&gt;&amp;#34;treePath&amp;#34;: &amp;#34;/0/&amp;#34;,&lt;br /&gt;&amp;#34;type&amp;#34;: &amp;#34;general&amp;#34;,&lt;br /&gt;&amp;#34;urlTitle&amp;#34;: &amp;#34;seagate-to-participate-in-investor-event&amp;#34;,&lt;br /&gt;&amp;#34;userId&amp;#34;: 20434,&lt;br /&gt;&amp;#34;userName&amp;#34;: &amp;#34;Test Test&amp;#34;,&lt;br /&gt;&amp;#34;uuid&amp;#34;: &amp;#34;9a2f4f42-abe3-40b2-a1a4-77d91481ff92&amp;#34;,&lt;br /&gt;&amp;#34;version&amp;#34;: 2&lt;br /&gt;}</summary>
    <dc:creator>S H</dc:creator>
    <dc:date>2016-03-15T05:22:46Z</dc:date>
  </entry>
  <entry>
    <title>RE: Is there any rest api to retrieve Related Assets for a particular artic</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=71386987" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=71386987</id>
    <updated>2016-03-14T14:22:15Z</updated>
    <published>2016-03-14T14:22:15Z</published>
    <summary type="html">I think to do this you need to use the AssetEntry portion of the JSON API with a classNameId referencing the JournalArticle and a classPK being the ID for the article with the related assets you want to retrieve.</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2016-03-14T14:22:15Z</dc:date>
  </entry>
  <entry>
    <title>Is there any rest api to retrieve Related Assets for a particular article?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=71364321" />
    <author>
      <name>S H</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=71364321</id>
    <updated>2016-03-14T07:20:49Z</updated>
    <published>2016-03-14T07:20:49Z</published>
    <summary type="html">I&amp;#39;d like to use rest api to fetch the article as well as Related Assets for that particular article.&lt;br /&gt;For retrieving article, I am able to find rest api like below to get the article.&lt;br /&gt;http://localhost:8080/api/jsonws/journalarticle/get-article/group-id/21290/article-id/21310&lt;br /&gt;&lt;br /&gt;However, I also want to retrieve the Related Assets for this particular article. Is there any rest api can do this?</summary>
    <dc:creator>S H</dc:creator>
    <dc:date>2016-03-14T07:20:49Z</dc:date>
  </entry>
</feed>
