- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I'm trying to add an alarm clock - preferably with an interval of 7 days - using Intel EMA and its API via Powershell.
Here is sample code to reproduce the issue:
$endpointid = "A296EED7F5997104BC4809ED2CE3BF3D80D61E0CCC968C0D432E950037608C31"
$body = @{ Name = "MaintenanceWindow"
StartTime = "2022-08-12T00:43:05Z"
Interval= @{Days = 7
Hours = 0
Minutes = 0}
DeleteOnCompletion= $false
} | ConvertTo-Json
Invoke-RestMethod "https://emaservername/api/latest/endpointOOBOperations/Single/AlarmClock/$($EndpointId)" -Headers $headers -Method POST -body $body
The error-response is
{"Message":"The StartTime property is required. The DeleteOnCompletion property is required. The Name field is required. "}
which indicates some error in my json, but it looks just like in the Swagger-Sample. It also doesnt work if I leave out the interval or set it to 0.
Other Post-Methods, like waking up an endpoint per /api/latest/endpointOOBOperations/Single/PowerOn work.
I'm on the current version of EMA (v1.8.0.0).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I solved it with further testing. It worked after adding -ContentType "text/json"
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I solved it with further testing. It worked after adding -ContentType "text/json"
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page