Hello,
I use rest API to request a list of assignable users for a JIRA project (identified by "issue key"):
GET http://<jiraserver>/api/2/user/assignable/search?issueKey=<project> HTTP/1.1 Accept: application/json Authorization: Basic <key> Accept-Encoding: gzip,deflate Host: btjira Connection: Keep-Alive
This returns 404 not found. Also tried:
GET http://<jiraserver>/api/latest/user/assignable/search?issueKey=<project> HTTP/1.1 Accept: application/json Authorization: Basic <key> Accept-Encoding: gzip,deflate Host: btjira Connection: Keep-Alive
This returns 400 with no explanation offered.
I tried this using an actual issue name for issueKey, and just the key (which is project name).
How do I make it return assignable users?
Community moderators have prevented the ability to post new answers.
The "Get" URL does not have escaped characters any longer, now I am getting 404, but with explanation: "The issue no longer exists". Request and response are below. What does this mean? Thanks.
Request:
GET http://servername/rest/api/latest/user/assignable/search?issueKey=projectname HTTP/1.1
Accept: application/json
Authorization: Basic Z3RvY3Npc2E6Z1QwIS1jUzFzM3J2SWMz
Accept-Encoding: gzip,deflate
Host: servername
Connection: Keep-Alive
Response:
HTTP/1.1 404 Not Found
Server: Apache-Coyote/1.1
X-AREQUESTID: 883x280604x2
X-ASESSIONID: 15mk157
X-ASEN: SEN-2013202
X-Seraph-LoginReason: OK
X-AUSERNAME: username
Cache-Control: no-cache, no-store, no-transform
Vary: User-Agent
X-Content-Type-Options: nosniff
Content-Type: application/json;charset=UTF-8
Date: Tue, 13 Oct 2015 21:43:01 GMT
Content-Length: 61
{"errorMessages":["The issue no longer exists."],"errors":{}}
Why is it expecting "issueKey" when I want to get assignable users for the whole project, not an individual issue? I also tried "projectKey" instead of "issueKey" and I get 400 again, and the message is:
{"errorMessages":["No project or issue key was provided"],"errors":{}}
Why doesn't this work?
That because there is no issue "projectname". Probably you should pass either correct issue key: ?issueKey=ISSUE-1 or search by project: ?project=projectkey
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
After adding the \rest prefix I continue to receive 400 error.
Request:
GET http://servername/rest/api/latest/user%2fassignable%2fsearch?issueKey=projectname HTTP/1.1 Accept: application/json Authorization: Basic keyhere Accept-Encoding: gzip,deflate Host: servername Connection: Keep-Alive
Response:
HTTP/1.1 400 Bad Request Server: Apache-Coyote/1.1 Content-Length: 0 Date: Tue, 13 Oct 2015 00:22:27 GMT Connection: close
What is wrong with the request?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see escaped slashes in the URL. Please try replacing http://servername/rest/api/latest/user%2fassignable%2fsearch to http://servername/rest/api/latest/user/assignable/search
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Valeriy!
You missed "rest" prefix:
http://<jiraserver>/rest/api/2/user/assignable/search
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.