20 lines
631 B
PowerShell
20 lines
631 B
PowerShell
$baseUrl = 'https://neo999.next-hd.net/pleasanter'
|
|
$siteId = '126841';
|
|
$uri = $baseUrl + '/api/items/' + $siteId + '/import'
|
|
$apiKey = '6504c8a807677a3a576e10327f3c19876c55736ee45d4a845796b9e7f5e087bfd4bd0d8184863da8cf1733ca635111432ab334aea59102b06a96ee6d2c05190d'
|
|
|
|
$filePath = "C:\Users\k.nogi\###nogiDEV\##Node.js\Care7\outputCsv\202501.csv"
|
|
|
|
$form = @{
|
|
parameters = ConvertTo-Json @{
|
|
ApiVersion = 1.1;
|
|
ApiKey = $apiKey ;
|
|
Encoding = "UTF-8";
|
|
UpdatableImport = $true;
|
|
Key = "Title";
|
|
};
|
|
file = Get-Item -Path $filePath;
|
|
}
|
|
|
|
Invoke-WebRequest -Uri $uri -Method 'Post' -Form $form
|