Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

JS7 offers to manage file transfer configurations, see JS7 - File Transfer.

  • Instead of managing the file transfer configuration from the JOC Cockpit GUI some users might prefer
    • to manage the XML configuration for file transfers externally, for example from a repository,
    • to generate the XML configuration based on input from sources such as a database,
    • to deploy the file transfer configuration within the scope of an automated CI/CD pipeline.
  • The JS7 offers the JS7 - REST Web Service API to perform such operations
    • A simplified wrapper for the REST Web Service is available from the JS7 - PowerShell Module
    • Below examples make use of the JS7 PowerShell Module. Running the examples with the -debug switch logs the respective requests that can easily be integrated with individual REST Clients.

Examples

Get list of available File Transfer configurations

The PowerShell CLI 2.0 - Cmdlets - Get-JS7FileTransferItem cmdlet can be used without further arguments to return the list of available file transfer configurations.

...

Code Block
languagepowershell
titleGet a list of available file transfer configurations
linenumberstrue
$yadeConfigItems = Get-JS7FileTransferItem
foreach( $yadeConfigItem in $yadeConfigItems )
{
	Write-Output $yadeConfigItem.name
}

Read File Transfer configuration

The PowerShell CLI 2.0 - Cmdlets - Get-JS7FileTransferItem cmdlet can be used with the -Name argument to return the respective file transfer configuration in XML format.

...

Code Block
languagepowershell
titleRead a file transfer configuration
linenumberstrue
[xml] $yadeConfig = Get-JS7FileTransferItem -Name primaryAgent

Write-Output $yadeConfig.Configurations.Fragments.ProtocolFragments

Store File Transfer configuration

The PowerShell CLI 2.0 - Cmdlets - Set-JS7FileTransferItem cmdlet can be used with the -Name and -Configuration arguments to add or to update a file transfer configuration with the JOC Cockpit inventory.

...

Code Block
languagepowershell
titleRead a file transfer configuration
linenumberstrue
[xml] $xml = '<?xml version="1.0" encoding="UTF-8" standalone="no" ?><Configurations/>'
Set-JS7FileTransferItem -Name sample21 -Configuration $xml

Remove File Transfer configuration

The PowerShell CLI 2.0 - Cmdlets - Remove-JS7FileTransferItem cmdlet can be used with the -Name argument to remove an individual file transfer configuration from the JOC Cockpit inventory.

...