Share Request using API

Share Request using API

Hi,

I can tell from a Python script that you guys posted recently, that Share Request is supported through the API. When I check your API documentation however, there's no info on the Share Request possibilities. Therefore I'm having difficulties implementing it as we use PowerShell for our scripts.

Usually (in this case to add a note to a request) we do something like this:

# Set system parameters
$sdphost = " http://URLtoServiceDesk/"
$techkey = "11111111-1111-1111-1111-111111111111"

# Set API module URL and operation - this is the URL for calling the request API
$url = $sdphost + "sdpapi/request/" + $workorderid + "/notes"
$method = "POST"
$operation = "ADD_NOTE"

# Configure input data for adding note to request
$input = @"
{
"operation": {
"details": {
"notes": {
"note": {
"ispublic": "false",
"notestext": "This is a test note"
}
}
}
}
}
"@

$params = @{INPUT_DATA=$input;OPERATION_NAME=$operation;TECHNICIAN_KEY=$techkey;format='json'}
$result = Invoke-WebRequest -Uri $url -Method POST -Body $params


Now, how do we do the same if we want to Share a Request? For instance, what is the exact operation name (instead of ADD_NOTE)? I've tried "SHARE_REQUEST" and "SHARE" but none of them are accepted.

Thanks in advance,
Rasmus

                  New to ADSelfService Plus?