Hi all,
I need to know the possibilities of analysis of Jira issues/complete Jira project?
What I need to do is:
- Access the existing Jira project A
- Then get the issues one by one within the Project A
- For each issue, analyze some fields such as attachment, comments
- If the specific type of attachment(basically based on extension based check) exists, then do further analysis, else reject the issue
Now from my reading and research, I have found that there are different ways to do it.
I am considering REST API.
Now my question is:
- Can my above steps achievable using REST API?
Thanks in advance
Hi @kumar
Welcome to the Atlassian Community.
Short answer: Yes that should be possible using the Jira REST API.
You can use this call to get the project: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-projects/#api-rest-api-2-project-projectidorkey-get
This call to get the issues and their attachment links: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-get
I hope this helps.
Cheers,
Peter
I have a small Python script for REST API here.
# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
from requests.auth import HTTPBasicAuth
import json
print("url")
url = "https://domain-name.atlassian.net/rest/api/2/project/search"
print(" url is done")
auth = HTTPBasicAuth("gmail_id@gmail.com", "API-TOKEN")
print("authenticated")
headers = {
"Accept": "application/json"
}
print("headers ")
response = requests.request(
"GET",
url,
headers=headers,
auth=auth
)
print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @kumar ,
This is just a basic example script from the documentation.
I would highly recommend that you try to do this on your own first before asking someone else to do the work for you.
If you really don't know how to do this I would recommend higher a developer to do this for you and to pay them, don't expect to get your work done for you for free.
Cheers,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.