How to get baseline ID by passing publication ID in ISHRemote?

Hi,

 

I am trying to get all baseline item(topic ID, image ID etc) using below script and able to gt all the details.

$ishSession = New-IshSession -WsBaseUrl $url -IshUserName $username -IshPassword  $password
    $baselineIds = @("GUID-9D4D5E8D-EF9F-4B9D-9760-DB55D4898377")
   
# echo Get-IshBaselineItem -IshSession $ishSession -Id $baselineIds

$basename=Get-IshBaselineItem -IshSession $ishSession -Id $baselineIds | Out-File D:\filename.txt

 

But I am passing baseline ID only to get all these result. Is there any way to pass publication ID and get baseline ID so I can pass baseline ID in this script and get all baseline Items.

Thanks

Roopesh

Parents
  • Hi Roopesh,

    you could do this sequence, starting with a publication identifier and version. Pass that to PublicationOutput 2.5 RetrieveVersionMetaData and you you get back something like:

    <ishobjects>

    <ishobject ishref="GUID-59E955C4-719C-440F-AE49-0741D410FB22" ishtype="ISHPublication" ishlogicalref="876330" ishversionref="1811032">
    <ishfields>

    <ishfield name="FTITLE" level="logical" xml:space="preserve">Dummy publication</ishfield>

    <ishfield name="VERSION" level="version" xml:space="preserve">4</ishfield>

    <ishfield name="FISHMASTERREF" level="version" xml:space="preserve">GUID-D85E01EE-5013-4CA4-A1BC-B5AEB20C0546</ishfield>

    <ishfield name="FISHBASELINE" level="version" xml:space="preserve">Super duper baseline</ishfield>

    </ishfields>

    </ishobject>

    </ishobjects>

     

     

    You have the name of the baseline in the <ishfield name="FISHBASELINE"> element.

    Pass the name of the baseline to Baseline 2.5 GetBaselineId to get the baseline identifier back.

    Pass the baseline identifier to Baseline 2.5 GetReport to get a list of all items in the baseline. Loop over that report to get the @ishlngref attribute of each item, filter by object type if you like (e.g. exclude ISHIllustration). Take that long list of @ishlngref items, chunk it up by, say, 100 items in a go and pass that to DocumentObj 2.5 RetrieveMetadataByIshLngRefs to retrieve whatever metadata you like and flesh out the original report with that.

    Hope this helps.

    Joakim

Reply
  • Hi Roopesh,

    you could do this sequence, starting with a publication identifier and version. Pass that to PublicationOutput 2.5 RetrieveVersionMetaData and you you get back something like:

    <ishobjects>

    <ishobject ishref="GUID-59E955C4-719C-440F-AE49-0741D410FB22" ishtype="ISHPublication" ishlogicalref="876330" ishversionref="1811032">
    <ishfields>

    <ishfield name="FTITLE" level="logical" xml:space="preserve">Dummy publication</ishfield>

    <ishfield name="VERSION" level="version" xml:space="preserve">4</ishfield>

    <ishfield name="FISHMASTERREF" level="version" xml:space="preserve">GUID-D85E01EE-5013-4CA4-A1BC-B5AEB20C0546</ishfield>

    <ishfield name="FISHBASELINE" level="version" xml:space="preserve">Super duper baseline</ishfield>

    </ishfields>

    </ishobject>

    </ishobjects>

     

     

    You have the name of the baseline in the <ishfield name="FISHBASELINE"> element.

    Pass the name of the baseline to Baseline 2.5 GetBaselineId to get the baseline identifier back.

    Pass the baseline identifier to Baseline 2.5 GetReport to get a list of all items in the baseline. Loop over that report to get the @ishlngref attribute of each item, filter by object type if you like (e.g. exclude ISHIllustration). Take that long list of @ishlngref items, chunk it up by, say, 100 items in a go and pass that to DocumentObj 2.5 RetrieveMetadataByIshLngRefs to retrieve whatever metadata you like and flesh out the original report with that.

    Hope this helps.

    Joakim

Children