HI ,
Im trying to add user to a specific project role in a project by using JIRA rest api and invoking it throw a power shell ,but when i'm passing json data as below , its giving me "Remote server returned error:400 bad request" error.
Invoke Rest-Method -Uri "https://jira url/jira/rest/api/2/project/project id/role/ role id" -Method post -Headers $Headers -Body $data1 -ContentType "application/json"
Json data
$data= @"
{
"user" : ["userid/name"]
}
$data1= $data | ConvertTo-Json
and please let me know whether i have to use PUT/POST functionality to add user to project role and its helpful if any code need to be added to Json .