Using ISHRemote to Identify Where Topics Are Used in Publications

Hello community,

I would like to find all publications that reference a specific topic (object) using ISHRemote.
If there's a cmdlet in the current ISHRemote version that supports this, I’d really appreciate your help.

I’m aware that the Publication Manager has a “Where Used” feature.
However, since I need to check a large number of topics, I hope to automate this process using a PowerShell script.

Background
In Tridion Docs, there are multiple topics with identical content but different GUIDs.
I want to identify which publications are using these topics.

I have already downloaded the files of topic from the Web Client search to my local environment.

Environment:
ISHRemote Version: 8.1.0
Tridion Docs Version: 15.2

Thanks as always for developing such powerful tools and for supporting the community.

emoji
Parents
  • Hi Satoru,

    The true reference of a topic can only be found by navigation every publication version from the top of the tree all the way down to the leaf - your topic. Along traversing that tree, your publication version points to a root DITA Map, the baseline explicitly holds a version for that DITA Map (or implicitly autocompletes), when conditions evaluate to true your DITA Map points to DITA submaps, DITA submaps over versioning point to DITA Topics, DITA Topics to DITA Libraries, etc :)

    The "Where Used" of Publication Manager takes some acceptable shortcuts and it checks if your topic is in a baseline assigned to a publication. Publication Manager upon opening of a publication version always adds all "used" content objects to a baseline which you typically Save to the CMS later. Publicaition Manager uses PublicationOutput 2.5 Containing behind the scene if I remember correctly.

    To not keep you in suspense, there is no easy to consume cmdlet. Theoretically, to get you going, you could...

    A. Iterate all your Publication Versions

    Iterate all Publication Versions in your repository, in turn Get-IShBaselineItem and check if your topic GUIDs are in there. So a brute force iteration using the GUID-present-in-baseline premise.

    $publicationOutputs = Get-IshFolder -FolderPath 'General\Mobile Phones Demo\Publications' | Get-IshFolderContent 
    Get-IshBaselineItem -Id $publicationOutputs[0].fishbaseline_version_element | Where-Object -Property LogicalId -EQ -Value 'GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'

    B. Use that Publication Manager WhereUsed API call

    Over the API you can do a more efficient lookup, but you have to iterate all versions of your topic. So '1' below means version 1.

    $xml = [xml]$ishSession.PublicationOutput25.Containing('GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx','1','')
    $xml.ishobjects.ishobject

    Best wishes,
    Dave

    emoji
Reply
  • Hi Satoru,

    The true reference of a topic can only be found by navigation every publication version from the top of the tree all the way down to the leaf - your topic. Along traversing that tree, your publication version points to a root DITA Map, the baseline explicitly holds a version for that DITA Map (or implicitly autocompletes), when conditions evaluate to true your DITA Map points to DITA submaps, DITA submaps over versioning point to DITA Topics, DITA Topics to DITA Libraries, etc :)

    The "Where Used" of Publication Manager takes some acceptable shortcuts and it checks if your topic is in a baseline assigned to a publication. Publication Manager upon opening of a publication version always adds all "used" content objects to a baseline which you typically Save to the CMS later. Publicaition Manager uses PublicationOutput 2.5 Containing behind the scene if I remember correctly.

    To not keep you in suspense, there is no easy to consume cmdlet. Theoretically, to get you going, you could...

    A. Iterate all your Publication Versions

    Iterate all Publication Versions in your repository, in turn Get-IShBaselineItem and check if your topic GUIDs are in there. So a brute force iteration using the GUID-present-in-baseline premise.

    $publicationOutputs = Get-IshFolder -FolderPath 'General\Mobile Phones Demo\Publications' | Get-IshFolderContent 
    Get-IshBaselineItem -Id $publicationOutputs[0].fishbaseline_version_element | Where-Object -Property LogicalId -EQ -Value 'GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'

    B. Use that Publication Manager WhereUsed API call

    Over the API you can do a more efficient lookup, but you have to iterate all versions of your topic. So '1' below means version 1.

    $xml = [xml]$ishSession.PublicationOutput25.Containing('GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx','1','')
    $xml.ishobjects.ishobject

    Best wishes,
    Dave

    emoji
Children
No Data