Hi all,
The technology heavy virtual conference called Tridion Experience Summit (TXS2021) is in progress. I believe you can still register on https://www.rws.com/TXS2021/ albeit to make sure that you are on the mailing list for the next one. The recordings will stick around there for 60 days, so I was told. Once I have the proper deep link, I will update this post, videos starting with "TXS 2021" on https://community.rws.com/product-groups/tridion/tridion-docs/m/videos
This blog post is to highlight the architectural session regarding Tridion Docs (formerly known as Trisoft InfoShare, LiveContent Architect, Knowledge Center) with a focus on the API - SOAP and REST flavoured.
Besides that an update of what is already available in ISHRemote v0.14 and a hands on explanation on the plans forward for ISHRemote as posted on https://community.rws.com/product-groups/tridion/tridion-docs/b/weblog/posts/automating-on-tridion-docs---the-plan-of-ishremote-v7-0
Below the example code I demo'd during this webinar.
# 20211208 TXS 2021 by ddemeyer
#
# Getting Started
#
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 # as PSGallery switched to HTTPS over Tls12 and higher
Install-Module ISHRemote -Repository PSGallery -Scope CurrentUser -Force
New-IshSession -WsBaseUrl https://example.com/ISHWS/ -IshUserName admin -IshPassword admin
# or
New-IshSession -WsBaseUrl https://example.com/ISHWS/ # Relying on Network Credentials
# or
$ishSession = New-IshSession -WsBaseUrl https://lvndevdemeyer.../ISHWSDita/ -PSCredential admin2 #-IgnoreSslPolicyErrors
Get-Command -Module ISHRemote
Get-Command -Module ISHRemote | Out-GridView
Get-Help -Name New-IshSession -Examples
# Having an implicit session means you get auto complete
Set-IshMetadataField -Name ...
$ishSession
#
# End-of-line is preferably pipe (|) instead of escape next character (back tick `)
# Initialize connection, drop in temp $ishobjects, you get autocomplete
#
#
# Managing Annotations
#
# using ImportExcel module
Get-IshPublicationOutput -LogicalId GUID-03081B9A-11E4-4862-845B-27339E0C400D
Get-IshAnnotation -IshObject (Get-IshPublicationOutput -LogicalId GUID-03081B9A-11E4-4862-845B-27339E0C400D) | Export-Excel
$metadataFilter = Set-IshMetadataFilterField -Name DOC-LANGUAGE -Level Lng -FilterOperator Equal -Value en
$ishObjects = Get-IshDocumentObj -LogicalId GUID-F6DEEACC-8925-46B3-9EF3-5DAB76B4386F -MetadataFilter $metadataFilter
Get-IshAnnotation -IshObject $ishObjects | Export-Excel
#
# Walking the folder structure
#
$metadataFilter = Set-IshMetadataFilterField -Level Lng -Name CHECKED-OUT-BY -FilterOperator In -Value ("Admin, Admin2")
$requestedMetadata = Set-IshRequestedMetadataField -Level Lng -Name FISHSTATUSTYPE
$ishObjects = Get-IshFolder -FolderPath "\General\Mobile Phones Demo\" -FolderTypeFilter @("ISHModule", "ISHMasterDoc", "ISHLibrary", "ISHIllustration", "ISHTemplate") -Recurse |
Foreach-Object {
Write-Host ("Handling folder[$($PSItem.name)]...")
$ishObjects = Get-IshFolderContent -IshFolder $PSItem -VersionFilter Latest -LanguagesFilter @("en","fr") -MetadataFilter $metadataFilter -RequestedMetadata $requestedMetadata
# Create some report, some extra checks, a transformation, etc
Write-Output $ishObjects
} |
Out-GridView -PassThru
#
# Your card-field setup, including custom fields up to IMetadataBinding (IHandler)
#
New-IshSession -WsBaseUrl https://mecdev14qa.../ISHWSSQL2019/ -IshUserName admin -IshPassword admin #15.0.0
Get-IshTypeFieldDefinition | Out-GridView
#
# Simple Search Query, relying on Full-Text-Index
#
Search-IshDocumentObj -MaxHitsToReturn 2000 -SimpleQuery "red AND blue OR green" |
Out-GridView -PassThru
Search-IshDocumentObj -Count -SimpleQuery "red AND blue OR green"
#
# Rich Search Query, relying on Full-Text-Index, _but_ relying on the SOAP-WCF xml models
#
# https://docs.rws.com/955882/651598/tridion-docs-14-sp4/searchquery
$xmlQueryAllVersions = @"
<ishquery>
<and>
<ishfield name='ISHANYWHERE' level='none' ishoperator='contains'>*</ishfield>
</and>
<ishsort>
<ishsortfield name='ISHSCORE' level='none' ishorder='d'/>
<ishsortfield name='FTITLE' level='logical' ishorder='d'/>
</ishsort>
<ishobjectfilters>
<ishversionfilter>AllVersions</ishversionfilter>
<ishtypefilter>ISHModule</ishtypefilter>
<ishtypefilter>ISHMasterDoc</ishtypefilter>
<ishtypefilter>ISHLibrary</ishtypefilter>
<ishtypefilter>ISHTemplate</ishtypefilter>
<ishtypefilter>ISHIllustration</ishtypefilter>
<ishlanguagefilter>en</ishlanguagefilter>
</ishobjectfilters>
</ishquery>
"@
$ishObject = Search-IshDocumentObj -MaxHitsToReturn 1000 -XmlQuery $xmlQueryAllVersions
$ishObject[0] | Format-List
$ishObject[0].ftitle_logical_value
$ishObject.ftitle_logical_value
#
# PowerShell (Core) AND/OR Windows PowerShell Demo
#
dir C:\GITHUB\ISHRemote\Source\ISHRemote\Trisoft.ISHRemote\bin\Debug\ISHRemote
Import-Module "C:\GITHUB\ISHRemote\Source\ISHRemote\Trisoft.ISHRemote\bin\Debug\ISHRemote" # Loading development module
New-IshSession -WsBaseUrl https://mecdev14qa.../ISHWSSQL2019/ -IshUserName admin -IshPassword admin # 15.0.0
Get-Command -Module ISHRemote
Get-Help -Name New-IshSession -Full
Besides this session titled "Sneak previews along the way to modernized architecture in Tridion Docs" I would also highlight:
- Future proof your content with Semantic AI in Tridion
- Prioritizing developers with upcoming new OpenAPI in Tridion Docs
- Keeping track of organization-wide comments in Review Space
- Streamlining deployment and automating business tasks with Tridion Docs
Enjoy the holidays!
Dave
Translate