It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Cause of {"errorMessages":[],"errors":{}} with /rest/api/2/user/assignable/search? string Edited

Hi community members,

When I send the below API call,

https://company.url/jira/rest/api/2/user/assignable/search?project={{projectkey}}

I get an error 

{"errorMessages":["No project with the provided key exists"],"errors":{}}

Please advise where the problem source could be. The vendor - which supplies the third party JIRA app integration from the ticketing system - believes it is on the JIRA side and JIRA admins think it could be on the vendor side. 

Additional info:

1.  JIRA hosted on an in-company server though named company.cloud; no atlassian.net domain URL, no vanity URL etc.,

2. Basic Authentication with username/password.

3. Whitelisting of all IPs done.

Your thoughts and ideas are really welcome.

PR

1 answer

Hi @PR ,

Did you check your project key at /rest/api/2/project?

And try this in web browser (e.g. Firefox), it's easier to read this way.

 

Best,

Michael

Hi Michael,

Yes, when I use the jira/rest/api/2/project, the project key does appear. it is only when I use /api/2/user/assignable/search?project={{projectkey}} that the error occurs.

What is the purpose of the "/jira" or the "/user/assignable/" within your search URL?

To search for something, it's just plain "/rest/api/2/search", as in:

https://{company.url}/rest/api/2/search?project={projectkey}

 

Hi David, 

The third party tool, Freshdesk, uses this REST API call to populate the field called Assignee in their widget for JIRA integration. The problem is that we are not able to assign to any users or JIRA developers from this dropdown list on the JIRA widget.

Here's how to test if the URL is valid:

  1. Open a web browser and login to Jira
  2. In the same browser, open a new tab
  3. Paste the complete URL into the tab's URL
  4. If it's valid, you'll get a properly formatted JSON response from the REST API
  5. If it's invalid, the REST API will say so and the fault is with the third party tool

Here's a test URL you can use on Atlassian's public Jira instance, as a proof of the method.

This works:

https://jira.atlassian.com/rest/api/2/search?project=BAM

 This does not work:

https://jira.atlassian.com/rest/api/2/user/assignable/search?project=BAM

But there is no error. I probably have no rights to get that information.

Well, I have been using the browser only to test out the URLs. I do get a json response file with the URL you have indicated, but get the error message while using the

rest/api/2/user/assignable/search?project=WBB

string in the URL. The third party vendor insists that this URL has to return a  response and there is nothing they can do on their side. I am grappling to understand what it is that needs fixing on JIRA side, as I too believe that the tool has to change but they do not think so. I need more info to justify which URL that they should use to look for a list of assignable users against a project.

Well, that might be as far as I can help. When I do test against Atlassian's own Jira, it works.

If I try the following:

https://jira.atlassian.com/rest/api/2/user/assignable/search

I get the expected error "No project or issue key was provided".

If I try with an invalid project key BATTY, like this;

https://jira.atlassian.com/rest/api/2/user/assignable/search?project=BATTY

I get the expected response "No project with the provided key exists"

If I try with a valid project key BAM, like this:

https://jira.atlassian.com/rest/api/2/user/assignable/search?project=BAM

I get no error, but I get no results either. This is probably because Atlassian won't let me return a list of their users, which makes sense as the REST API documentation says "This resource cannot be accessed anonymously"

When I try the following query against my own Jira Cloud instance, it works fine too:

https://{private}.atlassian.net/rest/api/2/user/assignable/search?project=BPT

This returns a list of assignable users for the project with the key BPT.

If I provide an invalid project key BATTY, I get the error "No project with the provided key exists" as expected.

So, if the error the tool is getting is "No project with the provided key exists" then the fault is with the tool's REST API call, as it contains an invalid project key.

If there is no error, but no results returned, the fault is still with the tool, as it's not properly authenticated to lookup the list of users.

Anything else, then I'd say you might have a bug due to the type of Jira you're using (IE Jira SERVER vs Jira CLOUD) or the version of Jira. I'd suggest you raise a bug ticket with Atlassian to have it investigated a bit further.

Thank you David for all the details and research. Appreciate your help. I will check with the vendor and Atlassian, per your suggestion, to identify a solution for my issue. 

Priya

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

3,354 views 11 5
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you