Forums

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

How do I create an API key with permission to query Assets?

Joshua Bennett February 2, 2024

I am trying to query Assets. I have a legitimate API key created in the Atlassian admin centre. However, I am getting forbidden when querying it. 

 

How do I create a valid key for querying Assets? There doesn't seem to be anywhere within Assets to do it, and the creation of the key in Atlassian doesn't seem to have the capacity to assign permissions. 

The Jira specific API doesn't seem to work either.

I've been querying the documentation on this but can't seem to find anything. 

I am a global admin on Jira and Atlassian with permission to update Assets. 

1 answer

0 votes
Mark Segall
Community Champion
February 2, 2024

Hi @Joshua Bennett - Assets are handled by the same API key as the rest of Jira.  However, there are a couple things that you could look at:

  1. Make sure you're using the assets API which is distinct from the Jira API
    https://developer.atlassian.com/cloud/assets/assets-rest-api-guide/workflow/
  2. The account will need to have appropriate permissions to the relevant object schema(s):
    https://YOURINSTANCE.atlassian.net/jira/servicedesk/assets/configure/object-schema/SCHEMAID

 

Joshua Bennett February 2, 2024

Hi, thanks for your response. You're saying that Assets are used querying the Jira API key - isn't that distinct from the Atlassian API? 

The Atlassian API I genereally use for stuff like user management etc, and I create the keys in admin.atlassian.com 

The Jira API I use to query ticket etc and I create in by going to the below link from my user settings. 

https://id.atlassian.com/manage-profile/security/api-tokens

When I use the api I use the query Jira (tickets etc) I get unauthorized. 

Using the Atlassian API Iget 'forbidden'.

Am I getting confused here? 

 

Mark Segall
Community Champion
February 2, 2024

While the  endpoint for Jira Assets is different, your authentication for each should be able to use the same token. The link I provided above is the best I can recommend for helping troubleshoot the issues.  It includes a link to this page that provides more detail around authentication:

https://developer.atlassian.com/cloud/jira/service-desk/basic-auth-for-rest-apis/

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events