tag:help-archives.hannonhill.com,2010-02-09:/discussions/how-do-i/16602-api-get-list-of-published-filesCascade CMS: Discussion 2015-02-27T16:19:05Ztag:help-archives.hannonhill.com,2010-02-09:Comment/361559982015-02-27T15:41:29Z2015-02-27T15:41:29ZAPI get list of published files.<div><p>Hi,</p>
<p>Perhaps a SQL query like this will do the trick?:<br></p>
<pre>
<code>select fc.cachepath as "path", s.name as "site" from cxml_foldercontent fc, cxml_site s
where fc.assetType = 'PAG' and fc.isCurrentVersion = 1
and fc.isRecycled = 0 and fc.shouldBePublished = 1
and fc.siteId = s.id order by s.name desc, fc.cachePath</code>
</pre>
Let me know if that returns the type of information you're looking
for.
<p>Thanks</p></div>Timtag:help-archives.hannonhill.com,2010-02-09:Comment/361559982015-02-27T16:15:59Z2015-02-27T16:16:00ZAPI get list of published files.<div><p>I have something similar:</p>
<pre>
<code>SELECT s.name as site_name, f.cachePath, b.id,s.url as url,s.path as path,s.state as state,f.assetType as type,f.displayName,
f.title,f.keywords,f.summary,f.teaser,f.description,f.startDate,f.endDate
FROM cxml_blob b
join cxml_foldercontent f on b.id=f.fileBlobId
join cxml_site s on s.id = f.siteid where s.name = 'site_name' and f.cachePath LIKE '%.php' and f.assetType = 'PAG' limit 100
;</code>
</pre>
<p>However, when I filter type = 'PAG' I get no results, even if I
remove all other query conditionals.</p>
<p>Yours seems to work!<br>
Thanks!</p></div>ATStag:help-archives.hannonhill.com,2010-02-09:Comment/361559982015-02-27T16:19:03Z2015-02-27T16:19:03ZAPI get list of published files.<div><p>No problem! Glad that helped. Have a good one!</p></div>Tim