Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
DataFile メソッドと Bearer トークン認証を使用して、データアクセス REST API 経由で ABBYY FlexiCapture のレポートアーカイブを取得する方法を、サンプル付きで説明します。
コード例 (PowerShell)
# 指定したテナントのレポート統計を含むアーカイブをダウンロードします
function GetDataFile {
Param (
[Parameter(Mandatory=$true)][String]$AppServer,
[Parameter(Mandatory=$true)][AllowEmptyString()][string]$TenantName,
[Parameter(Mandatory=$true)][string]$User,
[Parameter(Mandatory=$true)][string]$Password,
[Parameter(Mandatory=$true)][Int]$Year,
[Parameter(Mandatory=$true)][Int]$Month,
[Parameter(Mandatory=$true)][string]$DownloadPath,
[Parameter(Mandatory=$true)][string]$ReportingServiseUri
)
# 関数の Parameter で渡されたテナント名と application server アドレスを使用します $URI = "https://$AppServer/Flexicapture12/Server/FCAuth/API/wsdl?Tenant=$TenantName" # 指定された Username と password で PSCredential object を作成します
$creds = New-Object System.Management.Automation.PSCredential -ArgumentList @($user,(ConvertTo-SecureString -String $password -AsPlainText -Force)) # これらの credentials で認証するプロキシ Web service を作成します $proxy = New-WebServiceProxy -Uri $URI -Credential $creds
$proxy.Url = "https://$AppServer/flexicapture12/Server/FCAuth/API/Soap?Tenant=$TenantName"
$proxy.Credentials = $creds # これを使用して FlexiCapture API にトークンを要求します $ticket = $proxy.GetCurrentUserAuthTicket()
$nameFile = $year.ToString() + "-" + $month.ToString()
# ダウンロードファイルの path を作成します
$path = "$DownloadPath\$nameFile.zip"
# トークンを含む Bearer authentication header を付けた request を作成し、 # Reporting data access service に送信して、指定したテナントと期間のアーカイブを取得します
$headers = @{ Authorization = "Bearer " + $ticket}
Invoke-RestMethod -Uri $ReportingServiseUri"?tenantName=$TenantName&year=$year&month=$month" -Headers $headers -OutFile $path
} GetDataFile
このページは役に立ちましたか?