API get list of published files.

ATS's Avatar

ATS

27 Feb, 2015 02:00 PM

Is there any way to get a list of files, or better yet, the urls of files that have publishing enabled?
Strictly HTML and PHP files, not assets and templates,etc...

  1. Support Staff 1 Posted by Tim on 27 Feb, 2015 03:41 PM

    Tim's Avatar

    Hi,

    Perhaps a SQL query like this will do the trick?:

    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
    
    Let me know if that returns the type of information you're looking for.

    Thanks

  2. 2 Posted by ATS on 27 Feb, 2015 04:15 PM

    ATS's Avatar

    I have something similar:

    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
    ;
    

    However, when I filter type = 'PAG' I get no results, even if I remove all other query conditionals.

    Yours seems to work!
    Thanks!

  3. Support Staff 3 Posted by Tim on 27 Feb, 2015 04:19 PM

    Tim's Avatar

    No problem! Glad that helped. Have a good one!

  4. Tim closed this discussion on 27 Feb, 2015 04:19 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac