Issue does not exist or you do not have permission to see it

Peter Harding May 13, 2024

I am requesting - https://api.atlassian.net/rest/api/3/issue/CNP-6274 (GET) - in Postman with:

image.png

I am logged into Jira using SSO - the above email - and I have created an API token in my account - I still get a 404 NOT FOUND - and I can see it in the web interface:

 

image.png

 

What am I missing?

 

1 answer

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 13, 2024

Hello @Peter Harding 

Welcome to the Atlassian community.

Is the base URL you are using in Postman a match for the base URL of your Jira cloud instance? In postman you have https://api.atlassian.net . Is that the same base URL you see when you are looking at the issue through the Jira UI?

Peter Harding May 13, 2024

I have also tried

* jira.atlassian.net; and

* latitudefs.atlassian.net (which is the baseUrl used in our browser based Jira)

 

With jira.atlassian.net I get:

{
"errorMessage": "Site temporarily unavailable",
"errorCode": "OTHER"
}
With latitudefs.atlassian.com I get:
{
"errorMessages": [
"Issue does not exist or you do not have permission to see it."
],
"errors": {}
}
Peter Harding May 13, 2024

Found this - https://docs.atlassian.com/software/jira/docs/api/REST/1000.1041.0/ - but it does not seem to cover the use of tokens.

 

Peter Harding May 13, 2024

I haven't sorted out the Postman issue but did get it working with Python.

This worked:

#!/usr/bin/env python
#
#
# -----------------------------------------------------------------------------
"""
See  https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-search/#api-rest-api-2-search-get
"""
# -----------------------------------------------------------------------------
 
import os
import json
import requests

from dotenv import load_dotenv
from requests.auth import HTTPBasicAuth

load_dotenv()

ORG   = os.getenv("ORG_PREFIX", None)
TOKEN = os.getenv("JIRA_API_TOKEN", None)
EMAIL = os.getenv("EMAIL", None)

if ORG == None:
   raise("No organisation provided")

if TOKEN == None:
   raise("No token provided")

if EMAIL == None:
   raise("No email address provided")

ISSUE = "CNP-6001"

URL = f"https://{ORG}.atlassian.net/rest/api/2/search"

auth = HTTPBasicAuth(EMAIL, TOKEN)

HEADERS = {
  "Accept": "application/json"
}

query = {
  "jql": f"issue = {ISSUE}"
}

response = requests.request(
   "GET",
   URL,
   headers=HEADERS,
   params=query,
   auth=auth
)

print(json.dumps(json.loads(response.text),
sort_keys=True,
indent=4,
separators=(",", ": ")))

.env file contains the sensitive info

ORG_PREFIX=some-org
JIRA_API_TOKEN=xxxx
EMAIL=someone@example.com

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events