Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Field 'issuetype' does not exist or this field cannot be viewed by anonymous users.

Yasir Ijaz December 3, 2020

Exception Message: CURL HTTP Request Failed: Status Code : 400, URL:https://vfairs.atlassian.net/rest/api/2/search Error Message : {"errorMessages":["Field 'assignee' does not exist or this field cannot be viewed by anonymous users.","Field 'issuetype' does not exist or this field cannot be viewed by anonymous users."],"warningMessages":[]}

 

REST api's are working in my local system but when I run the same api on the server. It gives the above error.

2 answers

1 vote
Brant Schroeder
Community Champion
December 3, 2020

I almost forgot, Welcome to the community.

Yasir Ijaz December 3, 2020

Thank you :)

0 votes
Brant Schroeder
Community Champion
December 3, 2020

Yasir,

  Are you logged in when you are making the calls on your local system.  Try making the same call from an incognito window that will not have your authentication cached.  You will need to place credentials in your API call.  You should be able to use oauth, basic auth or cookie auth on the rest service.

Yasir Ijaz December 3, 2020

Already tried in incognito mode and in other browser.

I am using this package for api calls
https://packagist.org/packages/lesstif/php-jira-rest-client

Adding these configuration for connectivity.

'jiraHost' => 'https://abc.atlassian.net',               

 // for basic authorization:                

'jiraUser' => '####',               
'jiraPassword' => '#####',
'cookieAuthEnabled' => true,

Brant Schroeder
Community Champion
December 4, 2020

So on your local system if you are incognito mode, not logged in and you use packagist.org to send the rest call it works?

Yasir Ijaz December 4, 2020

yes

Brant Schroeder
Community Champion
December 4, 2020

When you are on the server and do all the same steps it does not work.  Have you done any type of trace to ensure that nothing is preventing it.  I am wondering if there is a firewall rule or something else causing the 400 error.  Are there any limitations to the browser (ie JavaScript disabled) on the server?

Suggest an answer

Log in or Sign up to answer