$inputData = @"
<Operation>
<Details>
<Worklog>
<workMinutes>15</workMinutes>
</Worklog>
</Details>
</Operation>
"@
$postParams = @{OPERATION_NAME = 'ADD_WORKLOG' ;TECHNICIAN_KEY = 'KEY' ;INPUT_DATA = $inputData }
$URI = "http://helpdesk:8080/sdpapi/request/{request_id}/worklogs"
Invoke-WebRequest -Uri $URI -Method Post -Body $postParams
This successfully adds a time log to whatever request Id is giving for {request_id}. But how am I able to make it dynamic?
I'm new to this and just digging in to it. This has me stumped though. Any help would be greatly appreciated.
Thanks!