Hello,
I got a not found error when I started the AddRoleMember task in the VMS RESTful API.
$ipAddress = "(ip address)"
$response = Invoke-RestMethod "http://${ipAddress}/api/rest/v1/roles/{role id}?task=AddRoleMember" -Method 'POST' -Headers $headers -Body $body
I received this response.
Invoke-RestMethod : { "error" : { "httpCode" : 400, "details" : [ { "errorText" : "Task not found" } ] } }
The result of getting the Role task is as follows. How should I use the AddRoleMember task?
Code
$response = Invoke-RestMethod "http://${ipAddress}/api/rest/v1/roles/68892720-4e81-4b8d-92dd-c4be43660a72?tasks" -Method 'GET' -Headers $headers
Response
{
"data": {
...
"tasks": [
{
"id": "SetClientTimeProfile",
"displayName": "Set client login time profile"
},
{
"id": "GetClientTimeProfile",
"displayName": "Get client login time profile"
},
{
"id": "SetClientProfile",
"displayName": "Set client profile on role"
},
{
"id": "ChangeOverallSecurityPermissions",
"displayName": "Edit overall security permissions"
}
There is an AddRoleMember task in the API spec, why can’t I use it?
https://doc.developer.milestonesys.com/mipvmsapi/#operation/postTaskForroles
Thank you,
Naozumi Mitsukawa