Hello,
I am new in using AE REST API, I am just doing my first attempts with AE 12.2.
My attempts to fetch data via GET were successful.
But now with using POST to add comment to an existing runid I run in trouble.
The UC4 user has full rights.
I do all my tests in Powershell. Here I am using Invoke-WebRequest.
The only header I send is authentication header.
Invoke-WebRequest : {
"code" : 45110,
"error" : "An Automation Engine internal error occured.",
"details" : "RESTEASY003200: Could not find message body reader for type: class com.automic.rest.api.request.InAddCommentBody of content type: application/x-www-form-urlencoded"
}
This is my Powershell code that I use.
$base_url_direct = "https://uc4-server:8088/
$client = "9000"
$user = "user"
$pass = "password"
$basicauth = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($user+":"+$pass))
$headers = @{}
$headers.add("Authorization", "Basic $basicauth")
$runid = "2988412"
$url = $base_url_direct+"/ae/api/v1/$client/executions/$runid/comments"
$body = convertto-json @{comment="comment by rest"}
$result = ""
$result = Invoke-WebRequest -Method POST -Headers $headers -Uri $url -Body $body -DisableKeepAlive
Any help would be appreciated.
Regards
Joachim
------------------------------
Service Manager JobManagement
Daimler
------------------------------