REST API get custom field values

I have administrator access to my JIRA projects, but not global administrative access.  I'm using Basic Authentication with a HTTP header.

So far, so good, except many of the custom fields contain the value

customfield_12130:[errorMessage:The action performed required a logged in user. Please log in and try again., i18nErrorMessage:[i18nKey:sd.admin.servicedesk.error.authenticated.user.required, parameters:[]]]

Other custom fields actually contain useful values.

On the JIRA issues search pages I can see the custom fields just fine.

Why can I see some custom fields but not others?

1 answer

0 vote
Steven Behnke Community Champion Jul 28, 2017

What endpoint are you using? What account are you using? What field is that field?

I'm using my company's Jira Server (not the cloud): https://mycompany/rest/api/latest

I see the error both with /issue and /search.

A friendly sysadmin just gave me temporary global admin access so I can see the definition of the custom field.  The custom fields that are having trouble are "Time to Resolve" (customfield_11257) and "Response Time" (customfield_11930).  I'm using my own account on the client side.  While I temporarily had global administrative access I saw the problem custom fields in question were added by Service Desk and they are locked.

Perhaps this is a bug on JIRA's part that we can't query the custom field values Atlassian provides.

Steven Behnke Community Champion Jul 28, 2017

Is the account an agent? Is there an endpoint in service desk specifically for sla fields? 

Not an agent, purely client-side (it actually a groovy script using the java-like RESTClient module).

There is a specific endpoint for service desk SLA:

https://docs.atlassian.com/jira-servicedesk/REST/3.6.1/#servicedeskapi/request/{issueIdOrKey}/sla

I believe that may be my problem.  I'll give it a try.

Steven Behnke Community Champion Jul 28, 2017

Agreed. An account must have agent status (licensed and in the Team role for that project) to retrieve SLA values. 

I believe the service desk endpoint is the workaround but I haven't used it myself. 

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Tuesday in Uncategorized

Friday fun: how many celebrates Midsummer holiday or is this a Swedish tradition only?

Any other country that celebrates Midsummer holiday (this friday 22 June)?  

44 views 3 1
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you