Hello,
I'm trying to use the REST Api to manage project roles in JIRA. I've been able to GET a list of the roles and "actors" and DELETE a role member. But I can't POST a new role member correctly. I keep getting a 400 or 405 error. I'm using HttpClient 4.3.2 and Jira 6.0.2. Here is my code:
// Set up ssl configuration as a user in JIRA instance HttpClient client = HttpClientBuilder.create().build(); HttpPost post = new HttpPost("https://jira.install/rest/api/2/project/KEY/role/10000"); StringEntity input = new StringEntity("\"group\" : \"jira-users\" }"); input.setContentType("application/json"); post.setEntity(input); client.execute(post);
Has anyone been able to do a similar call successfully?
Community moderators have prevented the ability to post new answers.
The problem was the capitilization for the ContentType. Application should be capitalized so it reads "Applicaton/json". This isn't explicitely shown in the REST API docs.
"Application/json" with an i
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.